Skip to main content
Glama

list_recent_commands

Retrieve recent shell commands with status, duration, and exit codes; search or filter by success or failure to diagnose terminal issues.

Instructions

List recent commands from history with status, duration, and exit codes

Input Schema

NameRequiredDescriptionDefault
limitNoNumber of commands to return (1-50, default: 10)
searchNoSearch in command text
statusNoFilter by status: 'all', 'success', 'failed' (default: all)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.2.5

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It discloses only that history is read and what fields appear (status, duration, exit codes); it says nothing about ordering (most-recent-first?), whether the list is scoped to the current session/workspace, retention depth of history, or read-only safety.

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

Conciseness5/5

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

A single front-loaded sentence with no filler; every clause (verb, scope, returned fields) earns its place.

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

Completeness3/5

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

With three fully documented optional parameters and no output schema, the description covers the essentials and helpfully names the returned fields. It still leaves meaningful gaps for a history tool: sort order, scope of history, and how 'recent' is bounded.

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%, so all three parameters (limit with its 1-50/default-10 range, search, status) are already documented. The description adds nothing beyond echoing the returned fields, and notably does not clarify that 'limit' is typed as a string.

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

Purpose4/5

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

States a specific verb ('List') and resource ('recent commands from history') plus the returned fields, which clearly separates it from execution siblings like execute_command or get_command_output. It stops short of naming a sibling explicitly, but the resource is unambiguous.

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

Usage Guidelines3/5

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

'From history' implies this retrieves already-executed commands rather than running new ones, which is an implicit disambiguation against execute_command. However, there is no explicit when-to-use guidance, no mention of when to prefer get_command_output for a single command's full output, and no stated exclusions.

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