Call Relationships
call_relationshipsExplore static call graphs: retrieve direct callers and callees of any function or method in your codebase.
Instructions
Return deterministic local callers and/or callees of a known function or method symbol.
Use this tool when you need to:
See which functions invoke a given symbol (callers) and where
Inspect which identifiers a function invokes inside its own body (callees)
Complement symbol_definition (single declaration site) and symbol_references (non-declaration usages)
Caller heuristic: lines containing ( that are not declaration-like; the nearest enclosing declaration is reported as callerSymbol when detectable. Callee heuristic: locates the symbol's definition and scans the brace-delimited body for identifiers followed by '('. Brace-language only in v1; non-brace bodies (e.g., Python) yield empty callees.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top_k | No | Maximum entries per side (1-100). Defaults to 20. | |
| symbol | Yes | Function or method identifier whose call relationships you want to inspect. | |
| direction | No | Which side of the call graph to compute. Defaults to both. | both |
| bypass_cache | No | When true, bypass caches for this call. | |
| exclude_paths | No | Optional workspace-relative glob filters to exclude matching paths after include filtering. | |
| include_paths | No | Optional workspace-relative glob filters to include matching paths only. | |
| language_hint | No | Optional language hint (currently advisory; reserved for future use). | |
| workspacePath | No | Optional workspace path. Defaults to the current workspace. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | ||
| callees | Yes | ||
| callers | Yes | ||
| metadata | Yes | ||
| direction | Yes | ||
| schema_version | Yes |