gograph_routes
List bounded pages of HTTP routes with methods, URL patterns, handlers, and source locations; filter by module or term to inventory a Go service and find routes before tracing handlers.
Instructions
List a deterministic bounded page of HTTP routes with methods, URL patterns, handler names, and source locations. Production routes are returned by default; include_tests=true adds *_test.go registrations. Optional term matches method/path, handler, or file. module selects an exact module path/directory, a unique nested-module directory basename, or the repository directory name for a root module. limit defaults to 100 and is restricted to 1-200; next_cursor continues the same filtered census. Each page is also bounded to 64 KiB so the result stays directly consumable instead of spilling to an out-of-band file. Constant nested Gin/Echo/Fiber Group prefixes and Chi Route closure prefixes are composed; Gin/Fiber use the final variadic argument as the terminal handler, while Echo uses the handler immediately after the path. Dynamically computed prefixes remain unresolved. The MCP server refreshes source analysis before this call. Read-only; no side effects. WHEN TO USE: To inventory one service/module or find a route before gograph_endpoint. NOT TO USE: For a handler's downstream call chain (use gograph_endpoint). RETURNS: gograph.routes.v1 JSON with total, returned, truncated, routes[], and next_cursor when more matches exist.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "gograph_routes"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root | No | 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. | |
| term | No | Optional case-insensitive substring matched against method/path, handler, or file. Path parameters match in any spelling: :id, {id}, and *id are equivalent | |
| limit | No | Maximum rows in this page, 1-200 (default: 100); the 64 KiB byte budget may return fewer | |
| query | No | Alias of term | |
| cursor | No | Opaque next_cursor from the previous gograph_routes result; reuse the same filters | |
| module | No | Optional exact module path/directory, unique nested-module directory basename, or repository directory name for a root module (for example identuum-idp) | |
| intention | No | Technical rationale, required for analytical calls selecting an active session. | |
| session_id | No | Caller selector returned by session_create. Omission means an independent caller; never inherits server environment or another caller's session. | |
| include_tests | No | Include routes registered in *_test.go files; false by default |