Skip to main content
Glama

find_path

Read-only

Find the shortest connection between two concepts in an ontology graph, returning hops, edges, and rationale for each link. When no path exists, suggests a concrete addition to grow the vault.

Instructions

Shortest path between two nodes (undirected BFS). Returns { from, to, hops: [slug...], nodes: [{uid, slug, kind, title, domain?}], edges: [{from, to, via, rationale?}] } where each via is the frontmatter key (domains / domain / capabilities / elements / dependencies / relates / contains / describes) that linked the two slugs and rationale is the one-line relation_notes sentence the declaring document stores for that pair (present only when one is stored) — so the agent sees not just that A and B are connected but by which key and, when someone wrote it down, why. Returns { found: false } when no path is found within maxHops, plus a growthHint — a concrete add_relation (both endpoints exist) or add_concept (an endpoint is missing) example so the unanswered question becomes a vault-growth signal instead of a dead end. maxHops defaults to 5 and is capped at 20.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesTarget slug.
fromYesSource slug.
maxHopsNoNon-negative integer maximum hop count (default 5, max 20).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYes
fromYes
hopsNo
edgesNo
foundYes
nodesNo
reasonNo
hopCountNo
growthHintNoOnly present when found=false — a candidate add_relation (both endpoints exist) or add_concept (an endpoint is missing) suggestion, derived from the real vault, not invented.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.13.0

TDQS

A3.7/5.0
Behavior5/5

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

The description goes far beyond the annotations (readOnlyHint=true, destructiveHint=false) by detailing the exact output structure: nodes with uid/slug/kind/title/domain, edges with from/to/via/rationale, the meaning of via as a frontmatter key, and the fallback { found: false } with a growthHint. It also discloses the undirected BFS algorithm, maxHops default (5) and cap (20). This is rich behavioral disclosure that fully informs the agent without contradicting annotations.

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?

The description is dense but well-organized: it leads with the core purpose, then details the output shape, then explains the fallback and maxHops. Every sentence carries useful information; there is no filler. It is slightly long, but the complexity of the output justifies the length. It is front-loaded with the essential action.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that an output schema exists and the annotations already cover read-only safety, the description is complete. It explains the return structure in detail, the failure mode with growthHint, and the algorithm constraints. There is nothing an agent needs to know about invoking this tool that 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?

The input schema already provides descriptions for all three parameters (from, to, maxHops) with 100% coverage. The description adds the default (5) and cap (20) for maxHops, which is also stated in the schema, and clarifies that from/to are slugs (already in schema). It does not introduce new meaning beyond what the schema provides, so it sits at the baseline of 3.

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 opens with a clear, specific statement of what the tool does: 'Shortest path between two nodes (undirected BFS).' This unambiguously names the verb (find path) and resource (nodes in a graph). However, it does not explicitly differentiate from sibling tools like find_neighbors or find_backlinks, though the purpose itself is distinct enough that an agent could infer when to use it.

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?

The description provides no explicit guidance on when to use this tool versus alternatives. It describes behavior and output in detail but never states conditions like 'Use this when you need the shortest path' or 'For direct neighbors, use find_neighbors instead.' The mention of growthHint implies a use case for exploring gaps, but that is implicit and not framed as selection criteria.

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