Skip to main content

MCP Tools Reference

Travsr exposes 26 tools over the Model Context Protocol, all using JSON-RPC 2.0. The graph query and observability tools work over both stdio and SSE; the repo and synonym management tools are stdio-only, so a remote SSE client sees 17.

Graph query tools

ToolWhat it returns
get_dependenciesDirect and transitive imports for a file
get_callersAll call sites of a symbol across repos
find_referencesEvery use site of a symbol, not just calls
find_patternGraph-scoped textual search for what the graph cannot model
get_blast_radiusFiles that would break if this file changes
search_symbolSymbol definition locations by name
get_repo_mapStructural overview of a repository
get_execution_pathPCST path between two symbols
get_contextFull PPR + knapsack context for a query (synonym-aware)
get_graph_statsExact node/edge counts + last-indexed commit
get_graph_jsonRaw subgraph as node/edge JSON for renderers
get_snippetsKind-aware source snippets for named symbols
get_lang_statusWhether semantic (Phase B) analysis is active for a file's language

Observability tools

Every tool above answers a question about your code. These answer questions about the index those answers came from, which is what lets an agent tell "there are no callers" from "the graph cannot see them yet".

ToolWhat it returns
get_index_statusFreshness, counts, Phase A/B state per language, semantic readiness
get_daemon_logsRecent daemon log entries, severity-filtered and redacted
get_graph_healthIntegrity report: ghost paths, orphan edges, lexical parity

All three are read-only and available over both stdio and SSE.

Repo management tools (stdio-only)

ToolWhat it does
repo_languagesPer-language node counts for the indexed repo
repos_listAll repos in the Travsr registry with DB existence status
repos_pruneRemove registry entries whose DB file no longer exists
repos_removeRemove one registry entry by name

Synonym tools (stdio-only)

ToolWhat it does
synonym_listList all synonym pairs
synonym_addAdd an alias to a term
synonym_setReplace all aliases for a term
synonym_removeRemove one alias or an entire term
synonym_resetRestore built-in synonym defaults

JSON Schema conventions

All tools accept a single JSON object. Required fields are marked "required": [...]. Paths are relative to the repository root unless a repo parameter is specified. Use dot notation for symbols (ClassName.methodName) or #-qualified signatures (src/auth/jwt.ts#sign).

Error format

{
"error": {
"code": "SYMBOL_NOT_FOUND",
"message": "No symbol matching 'PaymentService.charge' in repo.",
"details": { "repo": "/Users/me/my-project" }
}
}

Error codes

CodeMeaning
SYMBOL_NOT_FOUNDNo node matching the given name or path
FILE_NOT_FOUNDThe given file path does not exist in the graph
GRAPH_STALEThe graph is behind HEAD; run travsr init (or commit to trigger the hook)
BUDGET_EXCEEDEDToken budget too small to return any meaningful result
REPO_NOT_INDEXEDThe repo has not been initialized with travsr init