Explore Graph
synapse_explore_graphTrace incoming callers, downstream callees, and nearby context in a codebase graph; detect circular dependencies directly via symbol, file path, or chunk ID.
Instructions
Explores structural relationships within the codebase graph. High-level actions include:
'callers': finds all chunks that call a given chunk, with transitive depth support (1–3).
'callees': finds all functions, modules, or types that a chunk calls or depends on, with transitive depth support (1–3).
'context': retrieves rich structural context (callers, callees, related chunks) around a specific chunk.
'cycles': detects circular dependencies reachable from a given chunk. All four actions accept chunk_id OR (repo_id + symbol) OR (repo_id + file_path + optional line) — no separate lookup needed.
REPLACES: grep_search for caller discovery, manual import tracing, find_references, caller guessing. Use this tool instead of these alternatives for better results with 30-60% fewer tokens via automatic compression.
Usage (short): Explore caller-callee dependency relationships and semantic context in the code graph. Pass symbol + repo_id directly — no separate lookup needed.
Usage (long): Trace incoming callers, downstream callees, detect cycles, or retrieve immediate neighbours/references for a code chunk. ALL four actions (callers, callees, context, cycles) accept:
chunk_id (direct) — fastest, use when already known.
repo_id + symbol — resolves the symbol and runs in one call.
repo_id + file_path (+ optional line) — resolves by file position. Token-saving: both callers and callees support depth 1–3. Use depth: 2+ to get multi-hop results in a SINGLE call instead of chaining multiple depth-1 calls. One-call examples: callers: {action: 'callers', repo_id: 'MY_REPO', symbol: 'MyModule.my_fn', depth: 2} callees: {action: 'callees', repo_id: 'MY_REPO', symbol: 'MyModule.my_fn', depth: 2} cycles: {action: 'cycles', repo_id: 'MY_REPO', symbol: 'MyModule.my_fn'} Replaces manual import/caller guessing. Returns transitive callers/callees with depth control. Compression is on by default — graph results can be large.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | The action to perform. | |
| max_tokens | No | Approximate final response budget in tokens (500-32000, default 4000). | |
| compress_payload | No | Set false to disable lossless response-key compression. |