gograph_context
Fetch a pre-flight context bundle for a Go symbol—AST metadata, source, callers, callees, tests, and role—in one call before editing. Use uncommitted=true to bundle all modified symbols.
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. Read-only analysis; an active audit session may append local command telemetry. 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 (first match), nodes[] (all matches), source, callers[], callees[], tests[], test_results[], and top-level role; a missing symbol is a named error. source_error reports a partial context when indexed metadata exists but source cannot be served, also named in _meta.gograph_graph_state.read_diagnostic. With uncommitted=true, returns a contexts[] array; count:0 when no uncommitted symbols exist.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "gograph_context"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root | No | Absolute path of your checkout or worktree (alias cwd). | |
| 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. | |
| intention | No | Rationale; required with an active session. | |
| session_id | No | Session from session_create; omit for none. | |
| uncommitted | No | If true, return context for all uncommitted modified symbols bundled in one response. |