repomap
v1.9.0A map of your codebase for AI agents: code graph, search, call paths and change impact.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
map Map the codebase
Start here. A map of the repository: modules (communities of files that depend on each other), the most central files (PageRank), the most used symbols, and entry points. Pass `focus` (a directory) to zoom in and get an outline of its files and symbols with line numbers.
| Parameter | Type | Description |
|---|---|---|
focus | string | Directory to zoom into, e.g. src/server. |
format | string | text (default, compact, file:line cited) or json. |
limit | integer | Items per section (default 12). |
root | string | Repository root. Defaults to the client's workspace root or the server's working directory. |
tokens | integer | Token budget (estimated at 4 characters per token). Fills the map with the highest-ranked modules, files and symbols up to the budget and says what was omitted. Default: no budget. |
search Search code
Hybrid code search over AST chunks (whole functions, methods, classes): symbol names, BM25 keywords and a local code embedding model, so identifiers and plain questions both work, e.g. "parseConfig", "refresh token expiry" or "where are failed requests retried". Returns ranked file:line ranges with the matching lines.
| Parameter | Type | Description |
|---|---|---|
query * | string | |
format | string | text (default, compact, file:line cited) or json. |
include_tests | boolean | Default true (tests rank lower). |
kind | string | |
limit | integer | Max results (default 10). |
path | string | Only files whose path starts with or contains this. |
root | string | Repository root. Defaults to the client's workspace root or the server's working directory. |
context 360° view of a symbol or file
Everything about one symbol or file: its code, who calls it (with call-site lines), what it calls, subtypes, members, imports, importers and the tests that touch it. Large fixture trees are skipped until targeted (target one, or pass --include-fixtures). Target forms: `path/to/file.ts`, `file.ts:42`, `Class.method`, `Class::method`, or a bare name.
| Parameter | Type | Description |
|---|---|---|
target * | string | |
code_lines | integer | Lines of source to include for a symbol (default 60, 0 for none). |
format | string | text (default, compact, file:line cited) or json. |
root | string | Repository root. Defaults to the client's workspace root or the server's working directory. |
trace Trace call paths
With `from` and `to`: the shortest call path between two symbols or files, each hop cited file:line (falls back to the file dependency path). With only `from`: the call tree below it (direction callees) or above it (direction callers).
| Parameter | Type | Description |
|---|---|---|
from * | string | |
depth | integer | Tree depth (default 3). |
direction | string | |
format | string | text (default, compact, file:line cited) or json. |
root | string | Repository root. Defaults to the client's workspace root or the server's working directory. |
to | string |
impact Change impact (blast radius)
What breaks if this changes. Give `target` (symbol or file, or a list) or `changed: true` to analyse the current git diff. Returns a risk level, direct and indirect callers with call sites, importing files, modules touched, and the tests to run. Fixture files in deferred trees are not analysed unless targeted; the result says so.
| Parameter | Type | Description |
|---|---|---|
base | string | Git ref for `changed` (default HEAD). |
changed | boolean | Use the working-tree git diff (against `base`). |
depth | integer | Caller depth (default 3). |
format | string | text (default, compact, file:line cited) or json. |
root | string | Repository root. Defaults to the client's workspace root or the server's working directory. |
target |
db Database map
Map the database: tables, columns, primary and foreign keys, indexes, and the code that queries each table (file:line). By default it reads schema sources in the repo: SQL migrations, Prisma, Drizzle, SQLAlchemy, Diesel and Django models. To inspect a live Postgres, MySQL or SQLite database, pass `url_env` (the NAME of an environment variable holding the connection string). The connection is strictly read-only and the string is never stored or shown. Pass `table` for one table's full detail.
| Parameter | Type | Description |
|---|---|---|
format | string | text (default, compact, file:line cited) or json. |
root | string | Repository root. Defaults to the client's workspace root or the server's working directory. |
table | string | Focus on one table: columns, indexes, who references it, and where the code queries it. |
url | string | Connection string (prefer url_env so secrets stay out of transcripts). |
url_env | string | Name of an env var with the connection string, e.g. DATABASE_URL. |