Skip to main content
Glama

Run a command, get compact output

run

Execute shell commands and return compact output that preserves errors and summaries while keeping the full log searchable and pageable for noisy builds, tests, and installs.

Instructions

Runs a shell command and returns a compact view of its output: the first and last lines, every error with nearby context, and summary lines, with repeated lines collapsed. The full output is kept under a run id; use grep_output or read_output to see anything omitted. Prefer this over a plain shell for builds, tests, installs and anything noisy.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "command": "<command>"
    },
    "name": "run"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdNoWorking directory. Defaults to the server's working directory.
commandYesShell command to run, e.g. `npm test`.
budget_linesNoMost output lines to return.
timeout_secondsNoKill the command after this many seconds.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full disclosure burden and does unusually well: it explains the compaction algorithm (first and last lines, every error with nearby context, summary lines, repeated lines collapsed) and the retention model (full output kept under a run id). The gap is that it never mentions side effects, permissions, or that an arbitrary command can mutate the filesystem — material omissions for an execution tool, though "runs a shell command" implies them.

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, both dense with load-bearing information, with the primary behavior stated first and the alternative-tool routing second. No filler or restatement of the title.

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?

There is no output schema, so the description must describe return values, and it does so thoroughly — compact view composition, the run id, and where omitted lines live. The notable omission is exit status: an agent running builds or tests needs to know whether the return value reports a non-zero exit code.

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 cwd, command, budget_lines, and timeout_seconds are already documented in the schema. The description adds nothing parameter-specific beyond the general notion of a line budget and a run id, so the baseline of 3 applies.

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?

"Runs a shell command and returns a compact view of its output" gives a specific verb plus resource and immediately defines the transformation applied to the result. It distinguishes itself from a plain shell and from the sibling retrieval tools by naming grep_output and read_output as the way to see omitted content.

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?

It states an explicit preference rule — "Prefer this over a plain shell for builds, tests, installs and anything noisy" — and routes the agent to grep_output or read_output when full output is needed. Both the when-to-use and the when-to-look-elsewhere conditions are spelled out.

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

Deploy Server

Other Tools