Skip to content

MCP tools ​

Every tool is read-only and takes optional root (repository path) and format (text, the default, or json).

map ​

Start here. Returns modules (communities of files that depend on each other), the most central files, the most used symbols and entry points.

ArgType
focusstringDirectory to zoom into. Adds an outline of files and symbols with line numbers.
limitintegerItems per section (default 12)
tokensintegerToken budget (estimated at 4 characters per token). Keeps the highest-ranked modules, files and symbols that fit and ends with a line saying what was omitted. Default: no budget

Hybrid search that fuses symbol-name matches with BM25 over AST chunks, using reciprocal-rank fusion.

ArgType
querystring, requiredWords or identifiers, e.g. refresh token expiry, parseConfig
limitintegerDefault 10
pathstringOnly files whose path starts with or contains this
kindenumfunction, method, class, struct, interface, trait, enum, type, module, macro
include_testsbooleanDefault true (tests rank lower)

context ​

A 360° view of one symbol or file.

ArgType
targetstring, requiredpath/to/file.ts, file.ts:42 (the symbol at that line), Class.method, Class::method, or a name
code_linesintegerSource lines to include for a symbol (default 60, 0 for none)

For a symbol it returns the code, callers with call-site lines, callees, subtypes and implementations, members, and the tests that reach it within three calls. For a file it returns the outline, imports, importers, callers from other files and tests.

trace ​

ArgType
fromstring, requiredSymbol or file
tostringWith to: the shortest call path, which falls back to the reverse direction, then to the file dependency path
directioncallees | callersWithout to: the call tree below or above from
depthintegerTree depth (default 3)

impact ​

ArgType
targetstring or string[]Symbols or files to change
changedbooleanUse the working-tree git diff (and untracked files) instead. Changed lines are mapped to the symbols that contain them.
basestringGit ref for changed (default HEAD), e.g. main
depthintegerCaller depth (default 3)

Returns a risk level (low, medium or high), callers grouped by depth with call sites, the files that import the target files, the modules touched and the test files to run.

db ​

Database map: tables, columns, primary and foreign keys, indexes, and the code that queries each table.

ArgType
tablestringFocus on one table
url_envstringName of an env var with a live connection string (Postgres, MySQL, SQLite), read-only
urlstringConnection string. Prefer url_env so the secret never enters the transcript.

With no URL, repomap reads the repository's migrations, Prisma, Drizzle, SQLAlchemy and Diesel schema files, and Django models. See Database map.

Legacy names ​

architecture_*, codebase_search and find_related are accepted. See the migration guide.