Tool reference
All 22 MCP tools with their arguments, response shape, and a working call. Every tool returns structured JSON.
Conventions
Symbol ids
Most tools accept either an id or a qualified name. Resolve names with
search_symbols first. Ids follow a fixed scheme:
pkg.Type, Type#method,
Type#<init>, Type$field,
@Annotation.
Line numbers
Stored 0-based internally, but every tool response reports 1-based lines. Use them directly against an editor or a diff.
Limits and depth
List tools default to 50 results. Traversals are bounded by
max_depth and limit; both are validated against a
hard maximum so a query cannot run away.
Unknown symbols
A miss returns error, fuzzy suggestions, and a
hint instead of failing the call — so an assistant can recover
without guessing.
Index & schema
crawl_project
core
Index a project directory into the graph. Idempotent: refreshes changed files and removes vanished ones.
| Argument | Type | Required | Description |
|---|---|---|---|
path | string | yes | Absolute path to the project root. |
language | string | no | Force a parser language, e.g. "java". Defaults to extension detection. |
fileFilter | string | no | Only index files whose path contains this substring. |
Returns projectPath, filesScanned,
filesParsed, filesRemoved, nodes,
edges, resolvedCalls, unresolvedCalls,
dynamicDispatchEdges, adviceEdges,
aspects, decorators, languages,
durationMs.
crawl_project({ path: "C:/work/shop-service" })
index_status
core
Current node/edge/file counts and the last crawl timestamp.
No arguments. Returns nodes, edges, files, lastCrawl, projectPath.
index_status({})
get_schema
core
The live graph model: node kinds, edge kinds, id scheme, and dynamic-model semantics.
No arguments. Use it when an assistant needs to reason about which edge kind expresses a relationship before querying.
get_schema({})
clear_index
destructive
Wipe the graph database. You must crawl again afterwards.
No arguments. Returns { ok: true, cleared: true }.
clear_index({})
Symbol lookup
search_symbols
core
Fuzzy lookup by name or FQN across types, methods, fields, and files.
| Argument | Type | Required | Description |
|---|---|---|---|
query | string | yes | Partial name or FQN, e.g. "OrderService" or "place". |
kind | enum | no | Restrict to a node kind: class, interface, enum, method, constructor, field, ... |
limit | number | no | Max results, 1–200. Default 50. |
Returns query, count, and results[] with
id, qualifiedName, name,
kind, filePath.
search_symbols({ query: "OrderService", kind: "class" })
get_node
core
Metadata and source location for a single symbol.
| Argument | Type | Required | Description |
|---|---|---|---|
qualified_name | string | yes | Symbol id or qualified name. |
Returns id, kind, qualifiedName,
filePath, and properties (signature, modifiers,
annotations, startLine, endLine, ...).
get_node({ qualified_name: "com.acme.OrderService#place" })
Call graph
get_callers
core
Every symbol that calls the target, directly or transitively.
| Argument | Type | Required | Description |
|---|---|---|---|
symbol | string | yes | Method or constructor id/qualified name. |
transitive | boolean | no | Include transitive callers. Default true. |
include_dynamic | boolean | no | Also follow DYNAMIC_DISPATCH edges. |
include_advice | boolean | no | Also follow ADVISES edges. |
max_depth | number | no | Traversal depth cap, 1–50. |
limit | number | no | Max callers, 1–500. |
Returns target and callers[] with
caller, depth, callSiteLine,
edgeKind.
get_callers({
symbol: "com.acme.OrderRepository#create",
transitive: true,
include_dynamic: true
})
get_callees
core
Every symbol the target calls, directly or transitively.
| Argument | Type | Required | Description |
|---|---|---|---|
symbol | string | yes | Method or constructor id/qualified name. |
transitive | boolean | no | Include transitive callees. Default true. |
include_dynamic | boolean | no | Follow virtual/interface dispatch targets. |
include_advice | boolean | no | Follow advice edges. |
max_depth | number | no | Traversal depth cap, 1–50. |
limit | number | no | Max callees, 1–500. |
Returns source and callees[] with
callee, depth, callSiteLine,
edgeKind.
get_callees({ symbol: "com.acme.Checkout#checkout", max_depth: 4 })
trace_path
core
Find call paths between two symbols. Static by default; optionally route through dispatch and advice.
| Argument | Type | Required | Description |
|---|---|---|---|
source | string | yes | Starting symbol id or qualified name. |
target | string | yes | Destination symbol id or qualified name. |
include_dynamic | boolean | no | Also traverse DYNAMIC_DISPATCH edges. |
include_advice | boolean | no | Also traverse ADVISES edges. |
max_depth | number | no | Maximum path length, 1–50. |
limit | number | no | Max paths, 1–100. Default 10. |
Returns pathCount and paths[], each with
length, a symbol-id path array, and
edges[] carrying kind and callSiteLine.
trace_path({
source: "com.acme.Main#main",
target: "com.acme.Gateway#authorize",
include_dynamic: true,
max_depth: 12
})
get_subgraph
core
Neighborhood around a symbol across any edge kinds — for visualization and local shape.
| Argument | Type | Required | Description |
|---|---|---|---|
symbol | string | yes | Center symbol id or qualified name. |
radius | number | no | Hop radius, 1–6. Default 2. |
edge_kinds | enum[] | no | Restrict which edge kinds to follow. |
limit | number | no | Max nodes, 1–2000. |
Returns center, nodeCount, nodes[],
edges[].
get_subgraph({
symbol: "com.acme.Payment",
radius: 2,
edge_kinds: ["CALLS", "DYNAMIC_DISPATCH", "ADVISES"]
})
Dynamic behaviour
trace_execution
dynamic
Execution trace from a symbol: static calls, virtual dispatch, and woven advice as INTERCEPT hops.
| Argument | Type | Required | Description |
|---|---|---|---|
symbol | string | yes | Starting method or constructor id/qualified name. |
include_dynamic | boolean | no | Follow dispatch edges. Default true. |
include_advice | boolean | no | Weave aspect advice. Default true. |
max_depth | number | no | Depth cap, 1–50. |
limit | number | no | Max steps, 1–1000. |
Returns root, stepCount, and steps[]
with symbol, depth, via
(CALLS, DYNAMIC_DISPATCH, ADVISES, or
INTERCEPT), and callSiteLine.
trace_execution({
symbol: "com.acme.Checkout#checkout",
include_advice: true,
max_depth: 6
})
find_implementations
dynamic
Every class/interface that implements or extends a type, directly or transitively.
| Argument | Type | Required | Description |
|---|---|---|---|
symbol | string | yes | Interface or superclass id/qualified name. |
max_depth | number | no | Hierarchy depth cap, 1–20. |
limit | number | no | Max implementations, 1–500. |
Returns target, implementationCount, and
implementations[] with type, depth,
via (IMPLEMENTS or EXTENDS).
find_implementations({ symbol: "com.acme.Payment" })
find_aspects
dynamic
Aspects with their advice methods, pointcuts, and the methods each advice intercepts.
| Argument | Type | Required | Description |
|---|---|---|---|
limit | number | no | Max aspects, 1–200. |
Returns aspectCount and aspects[], each with
aspect and advice[] carrying method,
adviceKind, pointcut, and advised[].
find_aspects({ limit: 20 })
get_decorators
dynamic
Annotations applied to a symbol, optionally including its members.
| Argument | Type | Required | Description |
|---|---|---|---|
symbol | string | yes | Symbol id or qualified name. |
include_members | boolean | no | Also list decorators on declared methods, constructors, and fields. |
Returns symbol, decorators[] (name,
fqn, decorator, line,
arguments), and members[] when requested.
get_decorators({
symbol: "com.acme.DecoratedService",
include_members: true
})
find_annotated
dynamic
Every symbol carrying a given annotation — simple name, @name, or FQN.
| Argument | Type | Required | Description |
|---|---|---|---|
annotation | string | yes | Annotation name, e.g. "Transactional", "@Aspect", or an FQN. |
kind | enum | no | Restrict to a node kind. |
limit | number | no | Max symbols, 1–500. |
Returns annotation, count, and results[]
with symbol, annotation, line,
arguments.
find_annotated({ annotation: "Cacheable", kind: "method" })
Run-time wiring
The things a call graph cannot see: what a framework invokes, what a container injects, what reflects at run time, and where your code stops and third-party code starts. All five work across Java, Python, TypeScript and JavaScript.
find_entry_points
dynamic
Methods a framework or runtime invokes, with no in-project caller.
| Argument | Type | Required | Description |
|---|---|---|---|
kind | string | no | Filter by entry-point kind, e.g. "route", "main", "test". |
language | string | no | Restrict to java, python, typescript, or javascript. |
limit | number | no | Max entries, 1–500. |
Returns count and entryPoints[] with
symbol, kind, detail,
framework, and line. Recognised: Spring MVC
mappings, @Scheduled/@EventListener, tests,
main, FastAPI/Flask decorators, if __name__ == "__main__",
NestJS controllers, Express handlers, and Jest/pytest tests.
find_entry_points({ kind: "route", limit: 50 })
find_routes
dynamic
HTTP route → handler mappings, across frameworks.
| Argument | Type | Required | Description |
|---|---|---|---|
method | string | no | HTTP verb filter, e.g. "GET", "POST". |
path | string | no | Substring match on the route path. |
framework | string | no | e.g. "fastapi", "nestjs", "express", "spring". |
limit | number | no | Max routes, 1–500. |
Each route carries httpMethod, path,
handler, framework, and a ROUTES edge.
Inline Express handlers get a synthetic node
(module:src.routes#<anonymous@7>) so their body is still
traceable.
find_routes({ method: "POST", framework: "nestjs" })
find_injections
dynamic
Dependencies supplied by a DI container, as INJECTS edges.
| Argument | Type | Required | Description |
|---|---|---|---|
framework | string | no | e.g. "spring", "nestjs", "fastapi", "dependency-injector". |
target | string | no | Only injections into this symbol. |
limit | number | no | Max entries, 1–500. |
Detected from @Autowired members, NestJS constructor
parameters, FastAPI Depends(...), @injectable
constructor parameters, and project-class constructor parameters. Primitive
and structural parameter types are counted but produce no edge, so
@Body() body: { id: string } does not pollute the graph.
find_injections({ framework: "nestjs" })
find_reflections
dynamic
Run-time lookups that bypass the static call graph.
| Argument | Type | Required | Description |
|---|---|---|---|
mechanism | string | no | e.g. "class.forName", "getattr", "importlib", "import()", "require". |
resolved_only | boolean | no | Exclude targets that landed on a __reflect__: marker. |
limit | number | no | Max entries, 1–500. |
Returns count and reflections[] with
source, target, mechanism,
resolved, and line. When the target is statically
determinable — a literal, or a literal prefix plus a variable — the edge
points at the real symbol; otherwise it points at a
__reflect__: marker holding the expression.
find_reflections({ resolved_only: true })
find_external_dependencies
dynamic
Third-party packages referenced by the crawled code.
| Argument | Type | Required | Description |
|---|---|---|---|
limit | number | no | Max packages, 1–500. |
Returns count and dependencies[] with
package, references, and files.
Packages are normalised to the import root — ext:fastapi,
@nestjs/common, express. Project-internal
namespaces are never reported as external.
find_external_dependencies({ limit: 100 })
Analytics
find_hotspots
analytics
Rank callables by fan-in, fan-out, and advice interceptions.
| Argument | Type | Required | Description |
|---|---|---|---|
limit | number | no | Max hotspots, 1–200. |
min_fan_in | number | no | Minimum incoming call count. |
include_dynamic | boolean | no | Count dispatch callers too. Default true. |
Returns count and hotspots[] with symbol,
fanIn, fanOut, adviceCount.
find_hotspots({ min_fan_in: 3, limit: 25 })
find_dead_code
analytics
Callables with no incoming calls, dispatch, or advice edges.
| Argument | Type | Required | Description |
|---|---|---|---|
limit | number | no | Max symbols, 1–500. |
include_constructors | boolean | no | Include constructors. Default false. |
include_tests | boolean | no | Include test sources. Default false. |
include_dynamic | boolean | no | Treat dispatch edges as callers. Default true. |
Returns count and unused[] with symbol
and reason. main is excluded as an entry point.
find_dead_code({ limit: 100, include_constructors: false })
Dead-code output is a candidate list. Framework-invoked code — controllers, listeners, scheduled methods, serialization hooks, reflection targets — has no in-project caller and will be reported as unused.
Graph types
Node kinds
file package module
class interface enum
method constructor field
import external_symbol aspect
annotation_type annotation
unknown_symbol
Edge kinds
| Kind | From → to | Meaning |
|---|---|---|
CALLS | callable → callable | Resolved or unresolved call site. |
DECLARED_IN | symbol → type | Owning type of a member. |
CONTAINS | file/type → symbol | Lexical containment. |
IMPLEMENTS | class → interface | Interface implementation. |
EXTENDS | type → type | Superclass relation. |
IMPORTS | file → import | Import declaration. |
REFERENCES | symbol → symbol | Non-call reference. |
DYNAMIC_DISPATCH | callable → override | Runtime target of a virtual call. |
ADVISES | advice → advised | Aspect advice intercepting a method. |
ANNOTATED_WITH | symbol → annotation | Annotation usage with arguments. |
REFLECTS | symbol → symbol / marker | Run-time lookup (Class.forName, getattr, import()). |
INJECTS | type → type | Dependency supplied by a DI container. |
ROUTES | route → handler | HTTP route registration. |
Id scheme
| Symbol | Id |
|---|---|
| Type | com.acme.OrderService |
| Method | com.acme.OrderService#place |
| Constructor | com.acme.OrderService#<init> |
| Field | com.acme.OrderService$repo |
| Module | module:app.service |
| Module function | module:app.api#read_order |
| Module field | module:app.service$AUDIT_LOG |
| Inline arrow handler | module:src.routes#<anonymous@7> |
| Annotation | @Transactional |
| Import | __import__:java.util.List |
| External package | ext:fastapi |
| Unresolved call | __unknown__:System.out.println |
| Reflective marker | __reflect__:./plugins/${name} |
| Injection marker | __inject__:Repo |