gograph_context
Fetch AST metadata, source code, callers, callees, tests, and architectural role for a Go symbol in one call. Use before editing to eliminate separate roundtrips.
Instructions
Fetch a pre-flight context bundle for a single Go symbol: AST node metadata, source code, direct callers, direct callees, linked test functions, and architectural role classification — all in one call. Requires .gograph/graph.json — run gograph build . first. Read-only; no side effects. Set uncommitted=true to bundle context for all currently modified symbols at once. WHEN TO USE: As the first call before editing a symbol — eliminates 4–5 separate tool roundtrips. NOT TO USE: For package-level orientation (use gograph_focus); for transitive blast radius (use gograph_impact). RETURNS: JSON with node, source, callers[], callees[], tests[], and role; empty object {} when symbol not found. With uncommitted=true, returns a contexts[] array; count:0 when no uncommitted symbols exist.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | No | The exact name, dot-notation 'graph.Graph', or ID of the symbol to retrieve context for. | |
| uncommitted | No | If true, return context for all uncommitted modified symbols bundled in one response. |