shortest_path
Find the shortest path between two entities in a knowledge graph to reveal how concepts are connected.
Instructions
Find the shortest path between two entities in the knowledge graph using bidirectional BFS. Returns the path as a list of entity texts from source to destination. Useful for understanding how concepts are connected. Requires storage adapter with graph capability.
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": {
"src_entity": "<src_entity>",
"dst_entity": "<dst_entity>"
},
"name": "shortest_path"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max_hops | No | Maximum path length to search (default 4, max 10) | |
| dst_entity | Yes | The destination entity text | |
| src_entity | Yes | The source entity text |