graphify_subgraph
Retrieve a BFS subgraph centered on a node, limited by a token budget, to focus on the relevant code slice.
Instructions
Extract a BFS subgraph around a node, capped at a token budget.
This is the token-cheap way to hand the model just the relevant slice of a large codebase instead of the whole graph.
Args: node: Center node (exact or fuzzy match). hops: BFS depth from the center. budget_tokens: Approximate cap on returned size; expansion stops when hit.
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": {
"node": "<node>"
},
"name": "graphify_subgraph"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| node | Yes | ||
| hops | No | ||
| budget_tokens | No | ||
| as_json | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |