Skip to main content
Glama

search_commands

Search recorded shell commands by text to find individual commands, exit codes, timestamps, and directories—useful for 'did I run X' or 'what broke here'.

Instructions

Search recorded shell commands by text. One row per command: stable ID, exit code, timestamp, directory. Use this when you want individual commands — 'did I ever run X', 'what broke here', 'how is this project built'. When the question is about a whole piece of work rather than one command ('what did the last agent do', 'what was I working on'), start with find_agent_session or list_agent_sessions instead and drill in from there. Suvadu recorded the command and its exit code, never its output.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
afterNoOnly commands at or after this time: today, yesterday, N minutes ago, N hours ago, N days ago, N weeks ago, YYYY-MM-DD, or an ISO 8601 date-time such as 2026-10-18T10:00:00Z or 2026-10-18T10:00:00+05:30 (no offset means local time)
limitNoMax rows in this page (default: 20)
queryYesText to search for in commands, as one case-insensitive substring. If nothing matches, it is retried ignoring whitespace and -_./: (so hiveagent finds hive-agent), and the response notes it
beforeNoOnly commands at or before this time; a bare date includes that whole day: today, yesterday, N minutes ago, N hours ago, N days ago, N weeks ago, YYYY-MM-DD, or an ISO 8601 date-time such as 2026-10-18T10:00:00Z or 2026-10-18T10:00:00+05:30 (no offset means local time)
detailNoAdd directory, duration, executor and session to each row (default: false)
offsetNoRows to skip; pass the response's next_offset to page forward
executorNoFilter by executor (e.g. claude-code, cursor, human)
directoryNoFilter to commands run in this directory
exit_codeNoFilter by exit code (0 = success)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden and does substantive work: it discloses a key limitation ('recorded the command and its exit code, never its output') plus a non-obvious matching fallback that fires on zero results and annotates the response. It stops short of permissions, rate limits, or result-count behavior, so it is strong but not exhaustive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose, then routing guidance, then the recording caveat; every sentence does work. The parenthetical example questions add real selection value but make it slightly longer than strictly necessary.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Nine parameters at full schema coverage, no output schema, so the description correctly compensates on the return side by naming the default row fields. Combined with the routing guidance and the no-output caveat, an agent has what it needs to call and interpret this tool, though pagination is only implied via the schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and each parameter is richly documented in the schema itself (date grammar, limit defaults, substring/whitespace fallback, offset paging). The description adds the default column set but no per-parameter meaning beyond the schema, so the baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb+resource ('Search recorded shell commands by text') and immediately states the row shape (stable ID, exit code, timestamp, directory). This is enough to distinguish it from siblings like recent_commands, command_status, and the agent-session tools without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly frames when to use it ('did I ever run X', 'what broke here') and when not to, naming two alternatives (find_agent_session, list_agent_sessions) plus the drill-in pattern for whole-work questions. This is exactly the when/when-not/alternative structure the dimension rewards.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.