Search command outputs
search_outputSearch recorded terminal commands and outputs to find exactly which command printed a certain message. Returns matching results with context and metadata.
Instructions
Full-text search over recorded terminal commands, their outputs, and user notes — finds e.g. every command that ever printed 'connection refused'. Returns plain text, one block per match: id, time, cwd, exit code, the command line, and a snippet around the match (secrets are masked by default). Use this to FIND which command said something; use list_commands to browse recent history without a search term, and get_output to read a full output once you have an id. No matches returns an empty result, not an error. Read-only: never re-runs anything.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | only commands run in this directory or beneath it (absolute path, or '.' for the server's cwd) | |
| exit | No | only this exit code (a number), or 'fail' for any nonzero | |
| host | No | only commands from this synced machine ('local' = this machine) | |
| limit | No | max results (default 20, max 100) | |
| query | Yes | text to search for in command lines, outputs and notes (substring match; case-insensitive) | |
| since | No | only commands newer than this: 30m, 2h, 3d, 1w, or 2006-01-02[ 15:04] | |
| until | No | only commands older than this (exclusive; same forms as since). Combine with since to bound a time window, e.g. one day. | |
| context_lines | No | instead of a short snippet, show every matching output line with this many lines of context before and after (grep -C style, with line numbers; 0 = matching lines only, max 10). Often avoids a follow-up get_output call. |