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.
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": {
"grid": "<grid>",
"start": "<start>",
"end": "<end>"
},
"name": "astar_path"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | Yes | [row, col] end position | |
| grid | Yes | 2D grid (0 = passable, 1 = wall) | |
| start | Yes | [row, col] start position | |
| diagonal | No | Allow diagonal movement (default true) |