Skip to main content
Glama

gograph_explain

Read-onlyIdempotent

Generates an LLM-ready structured narrative for a Go symbol, covering callers, callees, complexity, SQL, routes, concurrency, tests, and interface satisfaction for onboarding and docs.

Instructions

Generate a synthesized, LLM-ready narrative for a Go symbol: role classification, callers, callees, complexity, SQL, env vars, HTTP routes, concurrency primitives, tests, and interface satisfaction — all in one structured document. 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: For onboarding to an unfamiliar symbol, generating PR documentation, or getting an opinionated architectural assessment without issuing multiple tool calls. NOT TO USE: For raw source code (use gograph_source); for targeted blast-radius analysis (use gograph_impact). RETURNS: Rich structured JSON with role, narrative summary, and all associated cross-references; {"found":false} when symbol is not in the graph.

Input Schema

NameRequiredDescriptionDefault
rootNoAbsolute path of the checkout you are working in (your cwd or git worktree). Must be this server's repository or one of its git worktrees; the answer then comes from that checkout's own graph. A path elsewhere is refused. Alias: cwd. Omit only when the configured checkout is the one you mean.
symbolYesThe name or ID of the symbol to explain (supports short name 'CreateUser', dot-notation 'graph.Graph', or fully-qualified ID)
intentionNoTechnical rationale, required for analytical calls selecting an active session.
session_idNoCaller selector returned by session_create. Omission means an independent caller; never inherits server environment or another caller's session.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.7.18
    • addedInput schema / properties / intention
      Added value: +{
      +  "description": "Technical rationale, required for analytical calls selecting an active session.",
      +  "type": "string"
      +}
    • addedInput schema / properties / root
      Added value: +{
      +  "description": "Absolute path of the checkout you are working in (your cwd or git worktree). Must be this server's repository or one of its git worktrees; the answer then comes from that checkout's own graph. A path elsewhere is refused. Alias: cwd. Omit only when the configured checkout is the one you mean.",
      +  "type": "string"
      +}
    • addedInput schema / properties / session_id
      Added value: +{
      +  "description": "Caller selector returned by session_create. Omission means an independent caller; never inherits server environment or another caller's session.",
      +  "type": "string"
      +}
  2. Addedv1.5.3
  3. Removedv1.5.3
  4. Changed1 schema field changed
    • changedInput schema / properties / symbol / description
      Previous value: -"The name or ID of the symbol to explain (e.g., 'CreateUser' or 'Graph')"New value: +"The name or ID of the symbol to explain (supports short name 'CreateUser', dot-notation 'graph.Graph', or fully-qualified ID)"
  5. First observedv1.0.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint, idempotentHint, destructiveHint false), yet the description adds genuinely new behavior: the server checks freshness before the call, refreshes in the requested analysis mode, and precise/precise_fallback graphs retry CHA/SSA after source changes. It also discloses the {"found":false} failure shape for symbols absent from the graph. Slightly more on what refresh means for latency/consistency would push this higher.

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?

Front-loaded purpose followed by clearly labeled WHEN TO USE, NOT TO USE, and RETURNS blocks makes it easy to scan. The opening enumeration of ten content categories is long but each item conveys real scope, so little is wasted; the freshness/CHA-SSA sentence is the densest part.

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 read-only aggregate tool with no output schema, the description supplies everything an agent needs: what is produced, when to choose it over siblings, freshness/refresh semantics, and the not-found return case. No significant gap remains.

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 all four parameters (root, symbol, intention, session_id) are already well documented in the schema. The description adds no additional meaning about symbol formats, root scoping, or session selection, so the baseline of 3 applies.

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 ("Generate a synthesized, LLM-ready narrative for a Go symbol") and enumerates exactly what the document contains (role, callers, callees, complexity, SQL, env vars, HTTP routes, concurrency, tests, interface satisfaction). This makes it clearly distinguishable from single-aspect siblings like gograph_callers or gograph_complexity: this is the aggregate view.

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 section names three concrete scenarios (onboarding, PR documentation, architectural assessment without multiple calls) and a NOT TO USE section routes to two named alternatives with their conditions (gograph_source for raw source, gograph_impact for targeted blast-radius). Nothing is left to inference.

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