dijkstra_path
Finds the shortest path between two nodes in a weighted graph using Dijkstra's algorithm, with optional directed-graph support.
Instructions
Find the shortest path between two nodes in a weighted graph (Dijkstra's 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": {
"source": "<source>",
"target": "<target>",
"edges": "<edges>"
},
"name": "dijkstra_path"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| edges | Yes | Array of [from, to, weight] triples. | |
| source | Yes | Source node name. | |
| target | Yes | Target node name. | |
| directed | No | Treat graph as directed (default false). |