Trace path
trace_pathTrace paths through code graph to find callers, dependencies, and data flows. Supports calls, data_flow, and cross_service modes for impact analysis.
Instructions
Trace paths through the code graph. Modes: calls (callers/callees), data_flow (value propagation with args at each hop), cross_service (through HTTP/async Route nodes). Use INSTEAD OF grep for callers, dependencies, impact analysis, or data flow tracing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | calls: follow CALLS edges. data_flow: follow CALLS+DATA_FLOWS with arg expressions. cross_service: follow HTTP_CALLS+ASYNC_CALLS+DATA_FLOWS through Routes, plus CROSS_* cross-repo edges (CROSS_HTTP_CALLS/ASYNC_CALLS/CHANNEL/GRPC_CALLS/GRAPHQL_CALLS/TRPC_CALLS) to hop into other services. | calls |
| depth | No | ||
| project | Yes | ||
| direction | No | both | |
| edge_types | No | ||
| risk_labels | No | Add risk classification (CRITICAL/HIGH/MEDIUM/LOW) based on hop distance | |
| function_name | Yes | ||
| include_tests | No | Include test files in results. When false (default), test files are filtered out. When true, test nodes are included with is_test=true marker. | |
| parameter_name | No | For data_flow mode: scope trace to a specific parameter name |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||