gograph_context
Fetch complete context for any Go symbol in one call: AST metadata, source code, direct callers/callees, test functions, and role classification. Use before editing to eliminate multiple 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. 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. 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 |
|---|---|---|---|
| exact | No | Require an exact symbol-name or fully-qualified-ID match in single-symbol mode. | |
| 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. |