topological_sort
Sort record IDs or entity types by dependency order, placing parents before children for reliable data migration.
Instructions
Sort a list of entity types / record IDs in dependency order (parents before children). Useful for relationship-aware migration — e.g. migrate Epics before Stories before Sub-tasks. Provide nodes (IDs) and edges ([parentId, childId] pairs). Returns the sorted order.
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": {
"nodes": "<nodes>",
"edges": "<edges>"
},
"name": "topological_sort"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodes | Yes | List of record or type identifiers | |
| edges | Yes | Dependency edges: [parent, child] |