cos_graph_path
Find the shortest path between any two nodes in the coding-os knowledge graph by supplying source and target UIDs. Returns the route in either direction, limited by optional hop count.
Instructions
Shortest path between two nodes (either direction).
Args:
source_uid: Origin uid (auto-resolves raw paths; see
cos_graph_impact for the scheme).
target_uid: Destination uid (same rules as source_uid).
max_hops: BFS depth limit (default 5).
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_uid": "<source_uid>",
"target_uid": "<target_uid>"
},
"name": "cos_graph_path"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max_hops | No | ||
| source_uid | Yes | ||
| target_uid | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |