Skip to main content
← MCP Tools

get_daemon_logs

Read recent daemon log entries: what the indexer has been doing, and what it complained about. Useful when the graph is not what you expect and you want the reason rather than a guess.

Read-only. It never creates or writes a file, and it never reads outside this repo's .travsr/ directory.

Availability: single-repo stdio (travsr mcp) and global stdio (travsr mcp --global). Not served over SSE.

Input schema​

{
"type": "object",
"properties": {
"tail": {
"type": "integer",
"minimum": 1,
"maximum": 500,
"description": "Number of most-recent log lines to consider (default 50, max 500)."
},
"level": {
"type": "string",
"enum": ["error", "warn", "info", "debug"],
"description": "Minimum severity to include (default 'info'); more severe levels are always included."
}
},
"required": [],
"additionalProperties": false
}

tail and level are available in both single-repo stdio mode and global mode. In global mode the tool additionally accepts a repo to select one registered repo; it is required when more than one repo is registered, and a call never reads more than one repo's logs.

Output​

A JSON object (inside a <travsr-data> envelope) with the parsed entries, returned (how many entries came back), the source files they were drawn from, the repo it read, daemon_running, and a truncated flag.

Each entry carries ts, level, target, message, and any structured fields the daemon logged. The daemon writes JSON lines, and the stable thing to select on is fields.event (for example phase_b.complete), not fields.message, which is prose and may be reworded.

source is a list, not a single file. Logs rotate daily, so a response can legitimately draw from more than one file, and only files that actually contributed a returned entry are named.

Example response ({ "tail": 3 } on the Travsr repository):

{
"daemon_running": false,
"entries": [
{ "fields": { "event": "daemon.session.stop" }, "level": "INFO", "message": "travsr daemon stopped", "target": "travsr_daemon", "ts": "2026-09-25T12:14:12.462205Z" },
{ "fields": {}, "level": "INFO", "message": "travsr daemon shutting down (control socket)", "target": "travsr_daemon", "ts": "2026-09-25T12:14:12.407028Z" },
{ "fields": { "event": "kcore.updated" }, "level": "INFO", "message": "graph centrality updated", "target": "travsr_daemon", "ts": "2026-09-25T12:10:07.807194Z" }
],
"repo": "github.com/travsr-com/travsr",
"returned": 3,
"source": ["daemon.log.2026-09-25"],
"truncated": true
}

Redaction is best-effort​

Home directory paths and credential-shaped substrings are redacted before anything is returned, and a field whose name looks sensitive (token, password, api_key, …) is replaced wholesale rather than pattern-matched.

This is defence in depth, not a guarantee. Do not treat the output as certified secret-free. A secret in an unexpected shape, under an unexpected key, can survive.

When to use​

  • Explaining a surprising result. A language with no call edges usually said why, once, at WARN.
  • Checking whether indexing ran at all after a commit.
  • Diagnosing a sidecar that installed but is not producing edges.

Notes​

  • Bounded on both axes: at most 500 entries and a byte cap on the whole response, with truncated set when either bites.
  • An unparseable line is returned as a raw entry rather than dropped, so a torn write never hides the lines around it.
  • The CLI equivalent is travsr daemon logs.