dijkstra
Find the shortest weighted path between two graph nodes, returning distance, hop count, and path nodes; choose edge direction or weight property as needed.
Instructions
Shortest weighted path from source_id to target_id. Returns distance, hop_count and the path's nodes.
By default edges count in either direction, as "how are A and C connected" means; pass direction="outgoing" to follow edges only from source to target (a dependency or a flow).
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_id": "<source_id>",
"target_id": "<target_id>"
},
"name": "dijkstra"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| direction | No | "both" (default) ignores edge direction; "outgoing" or "incoming" follow it. | both |
| source_id | Yes | ||
| target_id | Yes | ||
| weight_property | No | Edge property with a non-negative number; without it each edge weighs 1. |