Skip to main content
Glama

gograph_source

Read-onlyIdempotent

Retrieve complete Go source code for a named function, method, struct, or interface by symbol, with file path and line numbers. Provides targeted access to implementation details without loading entire files.

Instructions

Retrieve the verbatim Go source code for a named function, method, struct, or interface, including its complete body. 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. WHEN TO USE: When you need to read a specific implementation in full without loading a large file — a targeted alternative to reading the whole file. NOT TO USE: For call hierarchy information (use gograph_callers/gograph_callees); for AST metadata without the full body (use gograph_node). RETURNS: Raw Go source block with file path and line numbers; returns an error when the symbol is not found or the source file cannot be read.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYesThe name of the symbol to retrieve source for (supports short name 'ValidateToken', dot-notation 'graph.Graph', or fully-qualified ID)
Behavior5/5

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

The description states read-only, no side effects, and adds details about freshness checking and retry behavior for certain graph modes. It also notes error conditions. This goes beyond the annotations which already indicate readOnlyHint and idempotentHint. 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.

Conciseness4/5

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

The description is well-structured with clear sections: purpose, internal behavior, usage guidelines, returns. It is front-loaded with the main action. However, it is somewhat lengthy with domain-specific details (CHA/SSA retry) that could be shortened, earning a 4 rather than 5.

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 single-parameter tool, the description covers returns (raw source with path and line numbers), error conditions, internal caching/retry, and usage context. It also differentiates from siblings. No gaps are apparent, especially given the rich annotations.

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?

The schema description coverage is 100%, so the baseline is 3. The description does not add significant new meaning about the 'symbol' parameter beyond what the schema already provides (format support). The parameter semantics are adequately handled by the schema.

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 clearly states the tool retrieves verbatim Go source code for named functions, methods, structs, or interfaces. It uses a specific verb-resource combination and differentiates from siblings like gograph_node (AST metadata) and gograph_callers/gograph_callees (call hierarchy).

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 and NOT TO USE sections are provided. The description tells the agent to use this tool when needing a targeted read of implementation without loading a full file, and directs away from call hierarchy or AST-only needs, naming alternative tools.

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