Skip to main content
Glama

Trace path

trace_path

Trace 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

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
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 is_test=true marker.
parameter_nameNoFor data_flow mode: scope trace to a specific parameter name

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

No annotations are provided, so the description carries the full burden. It explains the three modes and their edge-following behavior, and mentions risk_labels for classification. However, it does not disclose output format, potential side effects (likely read-only), or error handling.

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

Conciseness5/5

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

The description is very concise, consisting of two sentences plus a list of modes. It is front-loaded with the main action and immediately useful guidance. Every word contributes value without redundancy.

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

Completeness3/5

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

Given the tool's complexity (9 parameters, output schema exists), the description is adequate but not complete. It does not explain behavior for large graphs, timeouts, or invalid inputs. The output schema covers return values, so that is acceptable.

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

Parameters2/5

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

Schema description coverage is only 44% (low), and the description does not compensate. It briefly mentions modes but adds no detail on parameters like depth, direction, edge_types, or parameter_name. The schema's own descriptions are minimal (e.g., for mode it repeats the enum values).

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 clearly states the tool traces paths through the code graph, specifies three distinct modes (calls, data_flow, cross_service), and explicitly differentiates from grep for specific use cases like callers, dependencies, impact analysis, or data flow tracing.

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

Usage Guidelines4/5

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

The description provides explicit guidance by stating 'Use INSTEAD OF grep for callers, dependencies, impact analysis, or data flow tracing', indicating when to use this tool. However, it does not directly compare to sibling tools like query_graph or get_architecture.

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