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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| node | Yes | ||
| hops | No | ||
| budget_tokens | No | ||
| as_json | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |