Skip to main content
Glama

List recent commands

list_commands
Read-onlyIdempotent

Browse recent terminal commands with filterable details like exit code, directory, and time. Read-only history view for auditing or debugging, without re-running anything.

Instructions

List the user's recent terminal commands (most recent first) as plain text: one entry per command with id, time, cwd, exit code, duration and output size — command lines only, no output text. Supports the same filters as search_output, e.g. exit='fail' for recent failures or cwd='.' for this project only. Use this to browse history; use search_output when looking for specific text, and get_output to read what a command actually printed. Read-only: never re-runs anything.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoonly commands run in this directory or beneath it
exitNoonly this exit code (a number), or 'fail' for any nonzero
hostNoonly commands from this synced machine ('local' = this machine)
limitNomax results (default 20, max 100)
sinceNoonly commands newer than this: 30m, 2h, 3d, 1w, or a date
untilNoonly commands older than this (exclusive; same forms as since)
Behavior4/5

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

Description adds 'Read-only: never re-runs anything' which is consistent with annotations (readOnlyHint, idempotentHint). Provides useful behavioral context beyond what annotations declare.

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?

Two sentences, no wasted words. Main purpose stated upfront, followed by filter support and usage guidance. Excellent structure.

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

Completeness5/5

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

Given parameter count (6) and absence of output schema, description covers return format, what is not included (no output text), and filter usage. Fully sufficient for agent to use tool correctly.

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 covers 100% of parameters with descriptions. Description provides usage examples for some parameters (e.g., exit='fail'), but does not add significant new info beyond schema.

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?

Description clearly states 'List the user's recent terminal commands' and specifies format (plain text with id, time, cwd, exit code, duration, output size). Distinguishes from siblings by indicating when to use each tool.

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 gives guidance: 'Use this to browse history; use search_output when looking for specific text, and get_output to read what a command actually printed.' Also mentions same filters as search_output.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/soren-achebe/backscroll'

If you have feedback or need assistance with the MCP directory API, please join our Discord server