Skip to main content
Glama

Find the path between two nodes

codetopo_path
Read-only

Find the shortest typed path between two code graph nodes, or learn why no path exists.

Instructions

Shortest typed path between two nodes, or the reason there is none.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesNode id to reach.
fromYesNode id to start from.
db_pathYesPath to the index database.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already cover the safety profile (readOnlyHint=true, destructiveHint=false, openWorldHint=false), so the description needn't restate that. It does add genuine behavioral facts beyond annotations: the result is the *shortest* path, edges are *typed*, and a no-path case yields an explanatory reason rather than an empty result. It says nothing about path representation, node-vs-edge output, or cost 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?

One sentence, front-loaded with the core operation and closed with the failure clause. Nothing is padding and nothing important is buried.

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 read-only query with fully documented params this is thin but workable. The notable gap is that no output schema exists, so the description should describe what a returned path looks like (ordered nodes? typed edges?) — 'or the reason there is none' hints at an error string but leaves the success shape undefined.

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% — every parameter (db_path, from, to) has its own description — so the schema carries the parameter burden and the baseline is 3. The description's only added semantic is that paths are 'typed', which does not clarify the id format or what 'from'/'to' resolve against.

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?

Specific verb+resource: computes the shortest typed path between two named nodes, and additionally signals failure semantics ('or the reason there is none'). It is distinguishable from graph siblings like codetopo_neighborhood or codetopo_descendants by its pairwise from-to framing, though it never names those siblings.

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 explicit when-to-use, when-not-to-use, or alternative routing. The only implicit hint is that the tool is worth calling even when connectivity is doubtful, since it reports why no path exists. An agent still has to infer this tool's place among twelve graph siblings.

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