Skip to main content
Glama

Find Paths

find_paths
Read-only

Determine how two Infrahub objects are connected by tracing the shortest path(s) between them in the graph. Returns 0 if no path exists within max_depth.

Instructions

Find the shortest path(s) between two nodes in the Infrahub graph.

Use this to answer "how are these two objects connected?". A result with count of 0 means no path exists within max_depth. Requires Infrahub 1.10+.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
branchNoBranch to query. Defaults to the default branch.
sourceYesStart node: a UUID or kind-qualified HFID (e.g. 'InfraDevice__atl1-edge1').
max_depthNoMaximum relationship hops to explore (1-30).
destinationYesEnd node: a UUID or kind-qualified HFID.
kind_filterNoOnly traverse through nodes of these kinds.
relationship_filterNoOnly follow these schema relationship identifiers (e.g. 'device__interface').

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.2.0
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "result": {
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "result"
      -  ],
      -  "type": "object",
      -  "x-fastmcp-wrap-result": true
      -}New value: +null
  2. Addedv1.1.7

TDQS

A4/5.0
Behavior4/5

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

readOnlyHint=true already covers the safety profile, and the description adds real value on top: it explains the meaning of a zero-count result and states a version prerequisite (Infrahub 1.10+). It does not describe the shape of the path result itself, but the constraint disclosure is substantive.

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?

Three short sentences, front-loaded with the core action, then usage framing, then the edge-case and prerequisite. No filler or redundancy.

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

Completeness4/5

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

For a read-only traversal tool with no output schema, the description covers purpose, usage framing, a key result-interpretation rule, and a version prerequisite. What it lacks is any indication of the returned path structure (node lists, hop counts) or limits on result size.

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 all six parameters including source/destination formats, max_depth range, and both filters are already documented in the schema. The description adds only the max_depth interaction with count=0, which is baseline-level added meaning.

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 verb and resource ('Find the shortest path(s) between two nodes in the Infrahub graph'), which is precise and unambiguous. It does not, however, differentiate itself from the sibling find_reachable, which an agent would plausibly confuse with it.

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

Usage Guidelines4/5

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

Gives a concrete usage framing ('how are these two objects connected?') and clarifies that count of 0 means no path exists within max_depth. It stops short of naming the alternative tool (find_reachable) or stating when this should be preferred over it.

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