callers
Find every caller of a specific code node, including cross-module references via sym: stubs. Use with custom relation types to discover subclasses, conformers, or importers.
Instructions
Return all nodes that call a given node, resolving through sym: stubs.
Unlike query_codebase (which seeds on semantics and expands outward),
this tool performs a precise reverse lookup: it finds every caller of the
specified node, including cross-module callers that reference it via an
import alias recorded as a sym: stub.
The rel parameter accepts any edge relation, not just CALLS::
callers(node_id, rel="INHERITS") # find all subclasses
callers(node_id, rel="CONFORMS") # every type conforming to a protocol
callers(node_id, rel="IMPORTS") # find all importersTypical workflow::
# 1. Resolve the exact node ID
get_node("meth:Sources/Networking/Client.swift:HTTPClient.send")
# 2. Find all callers (production code only)
callers("meth:Sources/Networking/Client.swift:HTTPClient.send", paths="Sources/"):param node_id: Target node identifier, e.g.
cls:Sources/Networking/Client.swift:HTTPClient.
:param rel: Relation type to invert (default "CALLS").
:param paths: Comma-separated module path prefixes to include, e.g.
"Sources/" to exclude test callers.
Empty string (default) returns all callers.
:return: JSON with node_id, rel, caller_count, and
callers list of node dicts.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rel | No | CALLS | |
| paths | No | ||
| node_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |