get_lang_status
Return whether semantic (full cross-file) analysis is available for the language of a given file, and an install hint when it is not. Use it to decide whether call-edge queries on a file will be backed by resolved semantic edges or only by Tree-sitter structural edges.
Availability: single-repo stdio (travsr mcp), global stdio (travsr mcp --global), and SSE (travsr serve).
Input schema
{
"type": "object",
"properties": {
"file": {
"type": "string",
"description": "Repo-relative file path to detect language for"
},
"repo": {
"type": "string",
"description": "Repo name (run repos_list to discover). Always supply to avoid cross-repo noise; omit only when explicitly querying across all repos."
}
},
"required": ["file"],
"additionalProperties": false
}
Output schema
This is one of the few tools that genuinely returns JSON.
{
"type": "object",
"properties": {
"language": { "type": "string" },
"status": { "type": "string", "enum": ["active", "partial", "needs_approval", "needs_consent", "unsupported", "unknown"], "description": "Stable machine tag; never reworded. This tool currently only ever produces active, partial, unsupported, and unknown; needs_approval and needs_consent are part of the shared status vocabulary but are not constructed by get_lang_status's own logic." },
"statusLine": { "type": "string", "description": "The same status as one human-readable line, with the concrete next step baked in when there is one." },
"builtin": { "type": "boolean" },
"semantic_available": { "type": "boolean" },
"install_hint": { "type": "string", "description": "The step to run to reach full analysis, empty when already active or when no build exists for this OS." },
"prerequisites": { "type": "string" },
"phase_b_commit": { "type": ["string", "null"], "description": "Commit the semantic data was last built at, null if never built." }
}
}
For a file extension the graph does not recognize, the response is a fixed literal that omits phase_b_commit entirely (not null) rather than filling in the fields above.
Example
Request:
{ "file": "cmd/worker/main.go" }
Response, semantic analysis not yet active:
{"language":"go","status":"partial","statusLine":"partial (run: travsr lang install go for full analysis)","builtin":false,"semantic_available":false,"install_hint":"travsr lang install go","prerequisites":"Go toolchain","phase_b_commit":null}
Response, a built-in language already active:
{"language":"typescript","status":"active","statusLine":"active","builtin":true,"semantic_available":true,"install_hint":"","prerequisites":"Node.js","phase_b_commit":"8d6d3ffa"}
Response, a file extension the graph does not recognize:
{"language":"unknown","status":"unknown","statusLine":"not a supported language","builtin":false,"semantic_available":false,"install_hint":"","prerequisites":""}
Built-in languages (TypeScript/JavaScript, Rust, Python) never need an external tool installed; if one of them is not yet active in this repo, install_hint is a reindex command (travsr init --semantic --force), not an install command. Other languages report partial with an install_hint such as travsr lang install go until their analyzer is installed on this machine; a language with no analyzer build for the current OS reports unsupported with an empty install_hint (there is no step that would help).
When to use
- Before semantic queries: confirm that
get_blast_radiuswithanalysis: "semantic"orget_callerswill use resolved call edges for this file's language. - Editor integrations: drive a one-click "install language tool" affordance when a file's language is recognized but full analysis is not yet active.
Notes
- Available over both stdio and SSE transports.
statusis a stable tag meant for programmatic branching;statusLineis the human-readable wording shown verbatim in the VS Code extension and CLI, so render it directly rather than re-deriving copy fromstatus.