repo_neighbours
Traverse code graph relationships from a known symbol or file node_id (callers, callees, base classes, definitions). Read-only, deterministic traversal, no side effects. When to use: use with a specific node_id (e.g.
Instructions
Traverse code graph relationships from a known symbol or file node_id (callers, callees, base classes, definitions). Read-only, deterministic traversal, no side effects. When to use: use with a specific node_id (e.g. from repo_search citations) to inspect callers (CALLS in), callees (CALLS out), inheritance, definitions, or the tests that reach a symbol through calls (TESTS in). When NOT to use: do not use for text search across code (use repo_search) or repo overview (use repo_map). Output: markdown list formatted as - <EDGE_TYPE> <in|out>: <name> (<path:line>) [<node_id>], or with format="json" the same rows as JSON plus co-changed files. To page past limit, pass cursor="" then each next_cursor: token from the reply's last line.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hops | No | Traversal depth from node_id (default 1, max 4). | |
| limit | No | Maximum neighbor rows to return (default 20, min 1, max 50). | |
| cursor | No | Opt-in paging. Omit for one unpaged answer. Pass "" for the first page of limit rows; while more remain the reply ends with a `next_cursor: <token>` line (also _meta.nextCursor). Pass that token back, other arguments unchanged, for the next page. | |
| format | No | Output format (default markdown). json returns {node, neighbours, cochange, truncated}: each neighbour row with its edge, direction, path and lines, and the files co-edited with the node's file -- for programs such as editors. | |
| node_id | Yes | Target graph node identifier to expand from (e.g. 'sym:pkg/mod.py::func', 'file:pkg/mod.py', 'dir:pkg'). | |
| min_confidence | No | Drop CALLS and TESTS edges below this confidence, 0..1 (default 0.0: keep everything, marking ambiguous edges). 1.0 keeps only unambiguous ones. |