get_graph_health
Check the graph against itself and against the filesystem: is anything indexed that no longer exists, is anything pointing at nothing, and does the lexical index still agree with the node table.
This is the report half of travsr fsck. It never mutates anything, so it is safe to call from an agent; the repair pass stays behind the CLI's --fix.
Input schema
{
"type": "object",
"properties": {},
"required": [],
"additionalProperties": false
}
No arguments in single-repo stdio mode. In global mode the tool accepts an optional repo.
Output
A JSON object reporting:
- Ghost paths: files present in the index but gone from disk. These are why a query can return a
path:linethat no longer exists. - Orphan edges: edges whose endpoint node is missing.
- Lexical index parity: whether the FTS index and the node table still describe the same set.
- Self-referential ref/call edges: a symbol recorded as calling itself, which is a defect rather than a curiosity.
Plus a healthy flag summarising all of it. A repo with self-referential edges is not healthy, matching what travsr fsck treats as a problem.
When to use
- A result names a file that does not exist. Ghost paths are the usual cause.
- After a large branch switch or rebase, where many files moved at once.
- Before trusting a zero. An empty answer from a graph with orphan edges is not evidence of absence.
Notes
- Available over both stdio and SSE.
- Slower than most tools. Cost scales with tracked file count, because it stats the files the index claims exist. It is not a tool to poll.
- Reporting a problem does not fix it. Run
travsr fsck --fixfor that, which is deliberately not reachable from MCP.