gograph_fields
Extract declared fields from a Go struct, including field names, Go types, and raw struct tag strings. Use this to inspect JSON/DB serialization mappings or enumerate fields before modification.
Instructions
Extract all declared fields from a named Go struct: field names, Go types, and raw struct tag strings (json, db, yaml, gorm, etc.). Requires .gograph/graph.json — run gograph build . first. Read-only; no side effects. WHEN TO USE: When mapping JSON/DB serialization tags, inspecting struct layouts, or enumerating fields before adding a new one. NOT TO USE: For methods on the struct (use gograph_node or gograph_source); for all struct initialization sites (use gograph_literals). RETURNS: Array of field entries with name, type, and tag string; empty when the struct is not found.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| struct | Yes | The exact name of the target struct to inspect fields for (e.g., 'Config', 'User') |