MCP
Watch mode
roka-mcp watch tails a log file. With --on-crash, a new line matching the crash pattern triggers the same prune pipeline used by the MCP tools. Pro API key required.
npx roka-mcp watch ./logs/dev.log --on-crash --api-key rk_live_...
Flags
| Flag | Description |
|---|---|
| <path> | Required. Log file to tail. If it does not exist yet, watch waits for it to be created. |
| --on-crash | Enable crash-triggered pruning |
| --budget <n> | Character budget for pruned output (default 4000) |
| --api-key, -k | Pro API key, or ROKA_API_KEY |
What happens on crash
- A new line matches ERROR, FATAL, CRITICAL, Exception, Traceback, or panic.
- Watch prunes the recently buffered context with the same local engine as the tools.
- Result is written to
.roka/crash-context.txt(directory created if needed), with a timestamp header.
Runs in the foreground until Ctrl+C / SIGTERM.
Without a verified Pro key, watch refuses to start tailing — same gate as connect and serve.