gograph_endpoint
Trace an HTTP endpoint end-to-end: resolve its handler, follow the call chain, and collect all emitted SQL queries and environment variables. Query by route pattern, path, or handler symbol.
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
| Name | Required | Description | Default |
|---|---|---|---|
| depth | No | BFS depth for call chain traversal, clamped to 1-20 (default: 5) | |
| query | Yes | Route pattern ("POST /api/users"), path suffix ("POST /users"), or handler symbol name ("CreateUser"). Constant grouped prefixes are resolved; dynamic prefixes remain best-effort. | |
| mermaid | No | Return Mermaid flowchart text instead of structured JSON | |
| include_tests | No | Include routes registered in *_test.go files |