Skip to main content
Glama

code.trace

Trace the shortest call path between two functions to reveal dependencies and understand how code flows through a call graph.

Instructions

Trace a call chain from one function to another. Shows the shortest path through the call graph.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesTarget function name
fromYesSource function name
maxDepthNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses the traversal semantics (shortest path through the call graph), which is a real behavioral trait, but says nothing about the read-only nature, what happens when no path exists, or any depth/performance limits.

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 short sentences, front-loaded with the core operation and then the key behavioral detail. No filler and nothing redundant.

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?

With no output schema and no annotations, the description is adequate to know the tool's job but thin on the details an agent needs: maxDepth semantics, no-path behavior, and read-only confirmation are all absent. It is minimally complete rather than fully complete.

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

Parameters3/5

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

Schema coverage is 67%: from and to are documented in the schema, while maxDepth has only a default and no description. The description adds no parameter detail and does not compensate for the undocumented maxDepth, so it neither helps nor hurts beyond the schema baseline.

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 states a specific verb (trace) and resource (call chain between two functions) and adds the algorithmic detail of shortest path over the call graph. It is clear on its own, but it never names or contrasts against closely related siblings like code.reach or code.map, so an agent cannot easily distinguish which tool to pick.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no prerequisites, and no mention of alternatives such as code.reach or code.map. The agent must infer the context entirely from the one-line purpose.

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