bellman_ford
Computes shortest paths from a source node in weighted directed graphs, including negative edge weights, and optionally reconstructs the path to a target node.
Instructions
Find shortest paths from a source node using Bellman-Ford (handles negative edge weights).
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>",
"start": "<start>"
},
"name": "bellman_ford"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| edges | Yes | Array of weighted directed edges | |
| start | Yes | Start node | |
| target | No | Optional target node for path reconstruction |