Skip to main content
Glama

Trace call paths

trace
Read-only

Find the shortest call path between two symbols or files, with each hop cited by file:line, or map callers and callees from a single starting point.

Instructions

With from and to: the shortest call path between two symbols or files, each hop cited file:line (falls back to the file dependency path). With only from: the call tree below it (direction callees) or above it (direction callers).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "from": "<from>"
    },
    "name": "trace"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNo
fromYes
rootNoRepository root. Defaults to the client's workspace root or the server's working directory.
depthNoTree depth (default 3).
formatNotext (default, compact, file:line cited) or json.
directionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already establish a safe read-only, closed-world operation, and the description adds real behavior beyond that: results are file:line cited, and path lookup degrades to the file dependency path when no symbol-level call path exists. It doesn't discuss truncation or what an empty result means, so it stops short of a 5.

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?

Two tight sentences, front-loaded by the differentiating argument, with no filler. Each clause carries either a mode definition or a behavioral fact.

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?

For a six-parameter read-only tracing tool with no output schema, the description covers the modes, the citation format, and the fallback behavior an agent needs to interpret results. Depth, root, and format defaults are left to the schema, which is acceptable since they are documented there.

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 coverage is 50%, and the two undocumented parameters (`from` and `to`) are precisely the ones the description explains — including that they accept either symbols or files. The remaining params (root, depth, format) are already described in the schema, so no gap is left.

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

Purpose4/5

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

The description names the concrete resources (shortest call path between two symbols or files; call tree) and splits them by the from/to shape, so an agent knows exactly what it gets. It does not distinguish this from siblings like impact or map, which is the only thing keeping it from a 5.

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?

It gives clear selection rules keyed on arguments: supply `to` for a point-to-point path, omit `to` for a tree, and use `direction` to choose callees vs callers. What's absent is guidance on when to reach for trace rather than impact/map/search.

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

Deploy Server

Other Tools