Skip to main content
Glama

graph_path

Traces the shortest hop-by-hop path between two nodes in a codebase knowledge graph, returning file:line evidence for every edge.

Instructions

Shortest path between two nodes, hop by hop, with evidence for every edge.

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": {
      "a": "<a>",
      "b": "<b>"
    },
    "name": "graph_path"
  }
}

Input Schema

NameRequiredDescriptionDefault
aYes
bYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It does disclose the return shape ('hop by hop, with evidence for every edge'), which is useful, but it says nothing about read-only nature, permissions, behavior when no path exists, or graph scope.

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 compact sentence that front-loads the operation and adds the output shape without filler. Every phrase earns its place.

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 simple two-parameter query this covers purpose and output content, but with no annotations, no output schema, and zero parameter documentation, the definition leaves key invocation details unstated. It is minimally adequate rather than complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for both parameters. It only says 'two nodes' and does not clarify whether a and b are node IDs, labels, or paths, nor what format they require. This is a significant gap for required parameters.

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 states a specific operation (shortest path) over a specific resource (two graph nodes), which is clear enough for an agent to understand the core function. It does not explicitly distinguish itself from the sibling graph_query, which likely also traverses the graph, so sibling differentiation is only implicit.

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 guidance on when to use graph_path versus graph_query or graph_explain, nor any stated preconditions such as whether both nodes must already exist. The agent must infer the tool's role from the name and description alone.

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