Skip to main content
Glama

astar_path

Calculates the shortest path between two points on a 2D grid using the A* algorithm, supporting walls and optional diagonal movement for navigation and planning tasks.

Instructions

Find the shortest path on a 2D grid using the A* algorithm.

Input Schema

NameRequiredDescriptionDefault
endYes[row, col] end position
gridYes2D grid (0 = passable, 1 = wall)
startYes[row, col] start position
diagonalNoAllow diagonal movement (default true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.11

TDQS

B3/5.0
Behavior1/5

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

No annotations provided, so the description must carry the full burden of behavioral disclosure. It does not explain that walls block movement, that diagonal movement is allowed by default, that the grid uses 0/1 values, or what the return format looks like. Without annotations and an output schema, this is severely lacking for a mutation-free but complex algorithm.

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, front-loaded sentence that states the purpose without any wasted words. It is appropriately sized for a simple tool description.

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

Completeness2/5

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

Given the complexity of A* pathfinding and the lack of annotations or output schema, the description is insufficient. It omits critical details such as default diagonal movement, grid interpretation, and what the function returns, leaving the agent to infer behavior from the schema alone.

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 the schema already documents all parameters, including the grid, start, end, and diagonal flag. The description adds no additional parameter semantics beyond stating it operates on a 2D grid.

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?

States a specific verb (find), resource (shortest path on a 2D grid), and algorithm (A*). This distinguishes it from sibling pathfinding tools like dijkstra_path, bfs_search, or dfs_search, which use different algorithms or heuristics.

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?

No guidance on when to use this tool versus alternatives like dijkstra_path or bfs_search. The description does not mention prerequisites, such as grid format or movement rules, nor does it specify scenarios where A* is preferred (e.g., with heuristics, weighted grids).

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

Deploy Server

Other Tools