gograph_callers
Find functions and methods that call a specified function or interface method before renaming or changing its signature. Supports configurable traversal depth and Mermaid diagrams.
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 |