Skip to main content
Glama

Trace path

trace_path
DestructiveIdempotent

Trace code paths through call graphs, data flow, and cross-service routes. Use for dependency and impact analysis instead of grep.

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. RESPONSE: prefix-grouped tree rows — callees/callers grouped under their shared qn-prefix, name hop per row (full qn = group prefix + dot + name); exact callees_total/callers_total on every page = ALL nodes reachable within depth (transitive, not just direct; test files excluded unless include_tests). risk/args flags use a flat table. truncated: true + next = more rows — pass next back as cursor. format="json" returns the SAME tree model as structured JSON.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNocalls: 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
depthNo
limitNoRows per page. callees_total/callers_total always carry the exact full counts; when a page is truncated the response carries next — see cursor.
cursorNoResume token from a previous response's 'next' field. Pass it back with ALL other arguments identical to get the following page with no duplicates. Cursors outlive nothing: after a reindex you get a stale_cursor error — just re-run the original query.
formatNoResponse encoding. tree (default): prefix-grouped text rows. json: the SAME tree model as structured JSON (groups + column-ordered row arrays).tree
projectYes
directionNoboth
edge_typesNo
risk_labelsNoAdd risk classification (CRITICAL/HIGH/MEDIUM/LOW) based on hop distance
function_nameYes
include_testsNoInclude test files in results. When false (default), test files are filtered out. When true, test nodes are included with a test column/marker.
parameter_nameNoFor data_flow mode: scope trace to a specific parameter name
include_evidenceNoAdd how each hop was resolved: a strategy class (lsp | language_rule | heuristic | unresolved) and the resolver's confidence. Off by default — it adds two columns per row. Use it to judge whether an edge is trustworthy, not to find edges.
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotation Contradiction. The annotations declare destructiveHint: true and readOnlyHint: false, while the description details a pure query/traversal operation (trace paths, follow edges, return rows) with zero mention of writes, deletions, or side effects. The description contradicts the destructive flag outright, and although it discloses rich response behavior, the metadata mismatch is disqualifying.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a dense single block but front-loads the core purpose and every sentence contributes (modes, usage, response format, totals, pagination, json parity). It could benefit from line breaks to improve scannability, but there is no filler or redundancy for a tool of this complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description correctly bears the burden of explaining return values, and it does thoroughly: prefix grouping, hop format, transitive totals, flat risk/args tables, truncation/next, and JSON equivalence. Gaps remain, such as the behavior of the undocumented edge_types parameter, direction semantics in data_flow mode, and depth bounds, so it is not fully complete for a 13-parameter tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 62%, and the description adds meaningful semantics beyond the schema: it explains the prefix-grouped tree model, that callees_total/callers_total are transitive within depth, that test files are excluded unless include_tests, and that cursor must be passed back for pagination. It does not illuminate vague params like edge_types or direction, but it substantially enriches the meaning of mode, depth, limit, cursor, and format.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb+resource: 'Trace paths through the code graph.' It then enumerates three distinct modes (calls, data_flow, cross_service) with concrete behaviors, and the 'INSTEAD OF grep' note separates it from sibling tools like search_code. This is precise and distinguishing.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Use INSTEAD OF grep for callers, dependencies, impact analysis, or data flow tracing' is explicit when-to-use guidance with a clear exclusion of the grep-like alternative. It gives the agent a decision rule for tool selection without ambiguity.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/DeusData/codebase-memory-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server