Skip to main content
Glama

gograph_context

Read-onlyIdempotent

Fetch a complete context bundle for a Go symbol in one call: AST metadata, source, callers, callees, tests, and architectural role. Use it before editing to avoid 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 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; empty object {} when symbol not found. With uncommitted=true, returns a contexts[] array; count:0 when no uncommitted symbols exist.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
exactNoRequire an exact symbol-name or fully-qualified-ID match in single-symbol mode.
symbolNoThe exact name, dot-notation 'graph.Graph', or ID of the symbol to retrieve context for.
uncommittedNoIf true, return context for all uncommitted modified symbols bundled in one response.
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare readOnlyHint=true, but the description adds context about freshness checks, retry of CHA/SSA after source changes, and the side effect of appending telemetry in an audit session. This goes beyond structured annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but well-structured with labeled sections (purpose, WHEN TO USE, NOT TO USE, RETURNS). Every sentence conveys needed information, though some redundancy exists with the schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, so the description's 'RETURNS' section fully lists the response structure, including the empty-object case and the uncommitted contexts[] variant. This makes the tool's behavior predictable.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so each parameter is already documented. The description reinforces uncommitted=true behavior but does not add substantial detail beyond the schema definitions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Fetch a pre-flight context bundle for a single Go symbol', listing exact contents (AST metadata, source, callers, callees, tests, role). This clearly distinguishes it from sibling tools like gograph_callers or gograph_tests.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit 'WHEN TO USE' states it is the first call before editing to eliminate 4–5 roundtrips. 'NOT TO USE' names alternatives: gograph_focus for package-level orientation and gograph_impact for transitive blast radius.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ozgurcd/gograph'

If you have feedback or need assistance with the MCP directory API, please join our Discord server