MCP Tools Reference
Travsr exposes tools over the Model Context Protocol. All tools use JSON-RPC 2.0. The original graph query tools work over both stdio and SSE transports; the repo and synonym management tools are stdio-only.
Graph query tools
| Tool | What it returns |
|---|---|
get_dependencies | Direct and transitive imports for a file |
get_callers | All call sites of a symbol across repos |
get_blast_radius | Files that would break if this file changes |
search_symbol | Symbol definition locations by name |
get_repo_map | Structural overview of a repository |
get_execution_path | PCST path between two symbols |
get_context | Full PPR + knapsack context for a query (synonym-aware) |
get_graph_stats | Exact node/edge counts + last-indexed commit |
get_graph_json | Raw subgraph as node/edge JSON for renderers |
get_snippets | Kind-aware source snippets for named symbols |
get_lang_status | Whether semantic (Phase B) analysis is active for a file's language |
Repo management tools (stdio-only)
| Tool | What it does |
|---|---|
repo_languages | Per-language node counts for the indexed repo |
repos_list | All repos in the Travsr registry with DB existence status |
repos_prune | Remove registry entries whose DB file no longer exists |
repos_remove | Remove one registry entry by name |
Synonym tools (stdio-only)
| Tool | What it does |
|---|---|
synonym_list | List all synonym pairs |
synonym_add | Add an alias to a term |
synonym_set | Replace all aliases for a term |
synonym_remove | Remove one alias or an entire term |
synonym_reset | Restore 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
| Code | Meaning |
|---|---|
SYMBOL_NOT_FOUND | No node matching the given name or path |
FILE_NOT_FOUND | The given file path does not exist in the graph |
GRAPH_STALE | The graph is behind HEAD; run travsr init (or commit to trigger the hook) |
BUDGET_EXCEEDED | Token budget too small to return any meaningful result |
REPO_NOT_INDEXED | The repo has not been initialized with travsr init |