Skip to main content
Glama

gograph_context

Read-onlyIdempotent

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

TableJSON Schema
NameRequiredDescriptionDefault
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.
Behavior5/5

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

Annotations already declare readOnlyHint, destructiveHint, idempotentHint, openWorldHint. Description adds 'Read-only; no side effects' and details return behavior (JSON with specific fields, empty object when not found, array with uncommitted). No contradiction with annotations.

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

Conciseness5/5

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

Single paragraph with structured sections (precondition, when/not to use, returns). Front-loaded with core purpose. Every sentence adds value; no redundancy or fluff.

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?

For a tool with 2 params, rich annotations, and no output schema, the description covers prerequisites, use cases, return structure, and edge cases (empty object, uncommitted array with count). Completely adequate.

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

Parameters5/5

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

Schema descriptions cover both parameters (symbol and uncommitted) at 100%. Description adds meaning: symbol can be exact name, dot-notation, or ID; uncommitted bundles context for all modified symbols. Also explains return behavior for uncommitted parameter.

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?

Description clearly states 'Fetch a pre-flight context bundle for a single Go symbol' with specific components (AST metadata, source, callers, callees, tests, role). Distinguishes from sibling tools by noting it eliminates 4-5 separate calls and lists alternative tools for different use cases.

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?

Provides explicit WHEN TO USE (first call before editing a symbol) and NOT TO USE (package-level orientation -> gograph_focus; transitive blast radius -> gograph_impact). Also includes prerequisite: requires .gograph/graph.json and gograph build command.

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