dfs_search
Traverse a graph depth-first from a start node to find a path, return visit order and reachable count, and detect cycles.
Instructions
Depth-first search on a graph. Finds a path, visit order, reachable count, and detects cycles.
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": "dfs_search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| edges | Yes | Array of edges | |
| start | Yes | Start node | |
| target | No | Optional target node | |
| directed | No | Whether the graph is directed (default true) |