Skip to main content
Glama

trace

Computes a call chain from an entry symbol to a target sink such as a database or external call using bidirectional BFS, showing how code reaches dependencies.

Instructions

链路追踪:从入口符号到目标符号(如 DB/外部调用)的最短调用链(双向 BFS)

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": {
      "entry": "<entry>",
      "sink": "<sink>"
    },
    "name": "trace"
  }
}

Input Schema

NameRequiredDescriptionDefault
sinkYes
depthNo单侧限深,默认 5
entryYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/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 burden; it does disclose the algorithm (bidirectional BFS), that the result is the shortest chain, and that depth is per-side. It does not say what happens when no path exists, whether the search is bounded by workspace, or what the response looks like.

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?

A single dense sentence that front-loads the purpose and appends the algorithm and endpoint example without waste.

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?

For a 3-parameter tool with no annotations and no output schema, the description covers the search semantics but omits return shape (path as node list? edges?) and failure behavior, leaving real gaps an agent would want filled.

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 only 33% (only depth is documented), so the description must compensate; it does explain entry and sink as the two endpoints of the chain, which is the key semantic. It adds nothing about symbol format (fully-qualified name? ID?) or depth's effect on completeness.

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 a specific verb (trace) and resource (shortest call chain) and pins the scope to entry→sink with bidirectional BFS. It is clearly distinct from who_calls/impact in substance, but it never names those siblings, so the differentiation is left implicit.

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

Usage Guidelines3/5

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

The phrase 'from entry symbol to target symbol (e.g., DB/external call)' implies the scenario in which to use it, but there is no explicit when-to-use/when-not guidance and no routing to who_calls or impact for adjacent questions.

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