gograph_callers
Find direct or transitive callers of a function or method, with depth and test options, to assess impact before renaming or signature changes. Returns caller locations and call sites.
Instructions
Find functions and methods that call the specified function or interface method. Defaults to one-hop fan-in; depth 2-10 expands callers-of-callers. In a precise graph, Interface.Method expands through all recorded implementations and reports a shared source call site once. The MCP server refreshes source analysis before the call. Read-only; no persistent side effects. WHEN TO USE: Before renaming, removing, or changing a function or interface method signature. NOT TO USE: For unbounded upstream blast radius (use gograph_impact); for downstream callees (use gograph_callees). RETURNS: Caller symbols with package paths, file locations, and call-site line numbers; with mermaid=true, Mermaid flowchart text.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| depth | No | Traversal depth from 1 to 10 (default 1) | |
| exact | No | Require an exact symbol-name or fully-qualified-ID match | |
| mermaid | No | Return Mermaid flowchart text instead of the normal response | |
| function | Yes | The target function or method (supports short name 'BuildGraph', interface notation 'Repository.Delete', concrete dot-notation 'Store.Delete', or a fully-qualified ID) | |
| no_tests | No | Exclude call edges originating in *_test.go files |