gograph_fields
Extract declared fields from a Go struct, including field names, Go types, and raw struct tag strings for JSON, DB, YAML, or GORM mapping.
Instructions
Extract all declared fields from a named Go struct: field names, Go types, and raw struct tag strings (json, db, yaml, gorm, etc.). 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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"struct": "<struct>"
},
"name": "gograph_fields"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root | No | Absolute path of your checkout or worktree (alias cwd). | |
| limit | No | Rows per page. | |
| cursor | No | next_cursor from the previous page. | |
| struct | Yes | The exact name of the target struct to inspect fields for (e.g., 'Config', 'User') | |
| intention | No | Rationale; required with an active session. | |
| session_id | No | Session from session_create; omit for none. |