gograph_fields
Extract field names, Go types, and struct tags from a named Go struct to inspect serialization mappings or layout.
Instructions
Extract all declared fields from a named Go struct: field names, Go types, and raw struct tag strings (json, db, yaml, gorm, etc.). The MCP server checks freshness before this call and refreshes in the current requested analysis mode; precise and precise_fallback graphs retry CHA/SSA after source changes. 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') |