gograph_fields
Extract fields from a Go struct: names, types, and raw tags (json, db, yaml, gorm). Useful for mapping serialization tags or inspecting struct layouts before adding fields.
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') |