Skip to main content
Glama

plan_pathfind

Read-onlyIdempotent

Find shortest or alternative paths in weighted graphs. Solves routing, dependency, and critical-path problems using A* and Yen's algorithm.

Instructions

Find the shortest (or k-shortest) path between two nodes in a weighted graph using A* + Yen's algorithm. Use for routing, dependency resolution, project critical-path discovery, or 'how do I get from X to Y' questions on graphs. Set kPaths>1 to also return alternatives. For full graph structure analysis (centrality, communities), use analyze_graph. For task-to-time-slot assignment, use solve_schedule. Free.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodesYes
edgesYes
startYesStart node ID.
endYesGoal node ID.
heuristicNoA* heuristic. 'zero' = Dijkstra (default).
kPathsNoReturn up to k alternative paths (default: 1).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesNode IDs from start to end.
totalCostYes
breakdownNo
nodesExploredNo
foundYesFalse if no path exists.
executionTimeMsNo
alternativePathsNoOnly present when kPaths > 1.
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint. The description adds value by naming the specific algorithms (A* + Yen's) and explaining heuristic options, providing behavioral context beyond the annotations.

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?

The description is four sentences with no wasted words. It front-loads the core purpose and efficiently provides usage context, alternatives, and a key parameter hint. Every sentence serves a clear purpose.

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?

Given the complexity (6 params, output schema exists, sibling tools), the description covers the essential purpose, usage, and alternatives. It does not explain how multiple cost fields (time, cost, risk) are used, but the heuristic enum and schema descriptions partially address this. The presence of an output schema reduces the need to describe return values.

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 67% (high), so baseline is 3. The description adds a usage tip for kPaths but does not elaborate on nodes/edges structure or other parameters beyond what schema already provides. The schema descriptions for heuristic, start, end, and kPaths are adequate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool finds shortest or k-shortest paths using A* + Yen's algorithm, with specific verb and resource. It distinguishes from siblings by mentioning analyze_graph and solve_schedule as alternatives for different tasks.

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

Usage Guidelines5/5

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

Explicitly lists use cases (routing, dependency resolution, critical-path discovery) and provides direct alternatives for when not to use this tool (analyze_graph for graph structure, solve_schedule for scheduling). Also gives guidance on setting kPaths>1 for alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Whatsonyourmind/oraclaw'

If you have feedback or need assistance with the MCP directory API, please join our Discord server