shortest_path
Find the shortest path between source and target nodes in an edge-list graph using algorithms like Dijkstra. Specify edges, source, and optionally target and weights.
Instructions
Compute shortest paths on an edge-list graph.
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": {
"edges": "<edges>",
"source": "<source>"
},
"name": "shortest_path"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| edges | Yes | ||
| source | Yes | ||
| target | No | ||
| weights | No | ||
| algorithm | No | dijkstra | |
| edge_weights_attr | No | weight |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||