Skip to main content
Glama

trace_document_path

Read-only

Trace how two documents connect by following links in either direction, showing each step and the path's weakest link. Read-only.

Instructions

The shortest way two documents connect, walking links in either direction. Each step says how it is known, and the path is only as strong as its weakest step. Read-only.

Input Schema

NameRequiredDescriptionDefault
toYesA document id, as get_docs returns it
fromYesA document id, as get_docs returns it
max_hopsNoLongest path to look for (default 6)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations only cover readOnlyHint, and the trailing 'Read-only' adds nothing beyond that. However, the description does disclose non-obvious behavior: traversal is bidirectional, the path is shortest, each step carries provenance ('how it is known'), and overall confidence is bounded by the weakest step. That is real value beyond the annotation, though it omits what happens when no path exists within max_hops.

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?

Three tight sentences, front-loaded with the core operation before the weaker-link caveat. The only wasted clause is the trailing 'Read-only', which merely restates the readOnlyHint annotation.

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, the description should explain the return shape; it hints that each step reports how it is known, but never says the result is an ordered list of steps, nor what is returned when no path exists within max_hops. Adequate for a small read-only query tool, but a documented no-result case is missing.

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 description coverage is 100%, so from, to, and max_hops are already documented in the schema, including the default of 6. The description adds no extra meaning about parameter interpretation, so the baseline 3 applies.

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?

States a specific operation on a specific resource: find the shortest connection between two documents by walking links in either direction. An agent can distinguish this from a plain link-listing tool like get_document_links, though no sibling is named explicitly.

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?

Usage is only implied by the semantics of 'shortest way two documents connect'. There is no explicit statement of when to prefer this over get_document_links or get_graph_stats, nor any prerequisite (e.g., that both document ids must already exist).

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