Skip to main content
Glama

gograph_endpoint

Read-onlyIdempotent

Trace an HTTP route end-to-end: find the matched handler, downstream call chain, emitted SQL queries, and env vars read from a route pattern, path fragment, or handler name.

Instructions

Build a full vertical slice for one HTTP route: the matched handler symbol, a BFS call chain downstream (default depth 5), all SQL queries emitted in that chain, and all env vars read. Constant nested Gin/Echo/Fiber Group prefixes and Chi Route closure prefixes are composed into final paths; dynamically computed prefixes remain unresolved and can still be queried by suffix or handler. The MCP server checks content-digest freshness before this call and incrementally refreshes changed package ASTs in the current requested analysis mode; precise and precise_fallback graphs retry repository-wide CHA/SSA after source changes. Read-only; no side effects. WHEN TO USE: When auditing what an API endpoint does end-to-end — its downstream dependencies, database queries, and configuration reads. NOT TO USE: For listing all routes (use gograph_routes first to find the pattern); for raw handler source code only (use gograph_source). RETURNS: Array of endpoint slices with route, handler, call chain, SQL, and env fields; found:false with a suggestion when the query does not match any route. query accepts route pattern ("POST /api/users"), path fragment ("/users"), or handler name. depth controls call-chain BFS depth (default: 5).

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.
depthNoBFS depth for call chain traversal, clamped to 1-20 (default: 5)
queryYesRoute pattern ("POST /api/users"), path suffix ("POST /users"), or handler symbol name ("CreateUser"). Constant grouped prefixes are resolved; dynamic prefixes remain best-effort.
mermaidNoReturn Mermaid flowchart text instead of structured JSON
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.
include_testsNoInclude routes registered in *_test.go files

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. Changed1 schema field changedv1.5.8
    • changedInput schema / properties / query / description
      Previous value: -"Route pattern (\"POST /api/users\"), final path suffix (\"POST /users\"), or handler symbol name (\"CreateUser\"). NOTE: Nested route-group prefixes are lost statically."New value: +"Route pattern (\"POST /api/users\"), path suffix (\"POST /users\"), or handler symbol name (\"CreateUser\"). Constant grouped prefixes are resolved; dynamic prefixes remain best-effort."
  3. Changed4 schema fields changedv1.5.6
    • changedInput schema / properties / depth / description
      Previous value: -"BFS depth for call chain traversal (default: 5)"New value: +"BFS depth for call chain traversal, clamped to 1-20 (default: 5)"
    • changedInput schema / properties / depth / type
      Previous value: -"number"New value: +"integer"
    • changedInput schema / properties / include_tests / description
      Previous value: -"Include call-chain edges originating in *_test.go files"New value: +"Include routes registered in *_test.go files"
    • addedInput schema / properties / mermaid
      Added value: +{
      +  "description": "Return Mermaid flowchart text instead of structured JSON",
      +  "type": "boolean"
      +}
  4. Addedv1.5.3
  5. Removedv1.5.3
  6. Changed1 schema field changed
    • addedInput schema / properties / include_tests
      Added value: +{
      +  "description": "Include call-chain edges originating in *_test.go files",
      +  "type": "boolean"
      +}
  7. Changed1 schema field changed
    • changedInput schema / properties / query / description
      Previous value: -"Route pattern (\"POST /api/users\"), path fragment (\"/users\"), or handler symbol name (\"CreateUser\")"New value: +"Route pattern (\"POST /api/users\"), final path suffix (\"POST /users\"), or handler symbol name (\"CreateUser\"). NOTE: Nested route-group prefixes are lost statically."
  8. First observedv1.0.0

TDQS

A4.2/5.0
Behavior3/5

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

The description adds real context beyond the annotations: a content-digest freshness check, incremental AST refresh, and a repository-wide CHA/SSA retry path after source changes, plus the caveat that dynamically computed prefixes remain unresolved. These are meaningful operational traits that annotations (readOnly/idempotent) do not convey. However, the freshness/retry paragraph is dense, partially opaque, and never says whether the call can be slow or how it behaves when analysis is refused, so the disclosure is informative but uneven.

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 correctly: capability first, then prefix-resolution behavior, then WHEN/NOT TO USE, then RETURNS, then parameter notes. Information density is high, though the freshness/CHA-SSA sentence is a long embedded clause that a reader may need twice. Slight trimming would improve it without losing content.

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 seven-parameter analytical tool with no output schema, the description supplies the missing return contract (array of slices with route/handler/chain/SQL/env fields, plus the found:false suggestion), coverage of query forms and depth semantics, and the freshness/fallback behavior. An agent has enough to call it correctly on the first attempt.

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 coverage is 100%, so the schema already documents all seven parameters, and the description mostly restates them (query forms, depth default 5). It does add one genuinely useful nuance not spelled out in the schema — that unresolved dynamic prefixes can still be reached via suffix or handler — but it never mentions root, mermaid, include_tests, intention, or session_id, leaving that to the schema. Baseline 3 is appropriate.

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?

Opens with a specific verb and scope: 'Build a full vertical slice for one HTTP route', then enumerates the exact components of the slice (handler symbol, BFS call chain, SQL queries, env vars). It is immediately distinguishable from gograph_routes (list all routes) and gograph_source (raw handler code), which are named explicitly.

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?

Contains explicit WHEN TO USE ('auditing what an API endpoint does end-to-end') and NOT TO USE clauses that route the agent to two named siblings, gograph_routes for discovery and gograph_source for raw code. There is also a sequencing hint ('use gograph_routes first to find the pattern').

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