LayerMap
v0.1.64Call graph for coding agents: callers up to HTTP routes, callees, usages for TS/JS, Go, Python, Java
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
project_explore_map Callers, callees and impact of a change (LayerMap)
Use this instead of grep to answer what calls a function or method, what changing it affects (callers traced up to entry points such as HTTP routes, handlers, jobs and commands), what it calls, and what a directory or file contains: one call returns the callers or callees up to 8 levels deep, with file paths and line numbers, for TypeScript, JavaScript, Go, Python and Java. Read the static project map, zooming from the whole project to one declaration. path "." or a directory lists modules, module imports, external packages and its files: with exported declarations when the listing is small, a…
| Parameter | Type | Description |
|---|---|---|
depth | integer | Relationship hops for a declaration: up to 8 for INCOMING or OUTGOING (for example callers up to entry points), up to 3 for BOTH. |
direction | string | |
includeTests | boolean | |
includeUnresolved | boolean | |
line | integer | Start line of a same-named declaration; without name, the declaration containing this line. |
name | string | Declaration name or Container.member in the file, as printed by the map. |
offset | integer | |
path | string | "." or a directory for an overview, or a file for its declarations. |
project_search_map Find a declaration (LayerMap)
Use this to find where a function, method, class or type is declared, by name or by words in its name, path or documentation, before exploring its callers with project_explore_map. Find declarations and files whose names, paths or source documentation match query terms. ANY (default) matches any term, ALL requires every term, LITERAL matches the exact text. Results are ranked by relevance and grouped by file with the declaration name, kind, 1-based line range and matched fields (kinds f function, c class, m method, p property, v variable, t type, i interface, e enum; numbers are 1-based source…
| Parameter | Type | Description |
|---|---|---|
query * | string | |
kinds | array | |
matchMode | string | ANY matches one or more query terms; ALL requires every term; LITERAL matches the complete text literally. |
maxResults | integer | |
offset | integer | |
path | string |
project_find_references All usages of a declaration (LayerMap)
Use this to list every place a declaration is used (calls, imports, re-exports, reads and writes), compiled from current source: more complete than searching for its name. Compute usages of a mapped declaration from current source, including aliases, re-exports and non-call references. Select it as project_explore_map does, with path (its file) and name as printed by project_explore_map or project_search_map, and line (its start line) when names repeat; or with an entityRef or locator {path,start,kind}. Broader and more expensive than the cached callers in project_explore_map; file or unsuppor…
| Parameter | Type | Description |
|---|---|---|
cursor | string | |
entityRef | string | |
kinds | array | |
line | integer | Start line of a same-named declaration. |
locator | object | Declaration location: path and UTF-16 start offset; include kind to distinguish declarations at the same offset. |
maxResults | integer | |
name | string | Declaration name or Container.member in the file, as printed by the map. |
path | string | The file declaring it, as for project_explore_map. |
within | string | Only usages in this file or directory; compiler inputs and declarations may lie elsewhere in the project. |
project_check_changes What uncommitted changes affect (LayerMap)
Use this once the edits are done, before reporting the work done: it lists what the uncommitted changes affect, from the changed functions up to the HTTP routes, jobs and commands that reach them, plus the existing tests related to them. Compares the working tree with a commit (HEAD by default, so uncommitted and untracked changes), finds the declarations the diff changed, removed or renamed, and follows their callers, and the code using a field or type, up to 8 levels. It reports, conclusion first: AFFECTED ENTRY POINTS reached through resolved calls, each route with its HTTP methods and full…
| Parameter | Type | Description |
|---|---|---|
base | string | Commit, branch or tag to compare the working tree with (HEAD, so the uncommitted changes, by default; main for a whole branch). |
path | string | A file or directory in the repository to check, when the session works in more than one; the check covers that repository's whole working tree. |
tests | array | Test files that should cover the change, such as the ones you wrote for it, as paths are given to the other tools: the report then adds NOT REACHED BY THE GIVEN TESTS, the changed declarations none of… |