Skip to main content
Glama

run

Read-only

Execute shell commands without a shell and get parsed JSON, including piped output, row filtering/sorting, large-result pagination, and control of long tasks and services.

Instructions

Run a command without a shell and get parsed JSON. Pass the whole line as command (pipes to grep/head/tail/wc/sort/uniq/cut work). Large results return a preview, result_id and _hint; continue with query_result. Commands pass an execution guard. mode starts tasks and services; task_id reads or stops them.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

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

Input Schema

NameRequiredDescriptionDefault
cmdNoExecutable, when passing args separately
cwdNoWorking directory
argsNo
modeNotask: long command, returns task_id. service: start a server and wait until ready
limitNo
whereNo[{field, op: eq|ne|prefix|contains|gt|gte|lt|lte, value}]
cancelNo
selectNoFields to keep per row
commandNoWhole command line, e.g. "git log --oneline -5" or "ps aux | grep node | head -5"
optionsNoAdvanced: format, include_raw, includeDiff, array, aggregate, budget, contract_version, evidence, retain, machine_format, attribution, ready_pattern, ready_port, lease_ms, persist, page, page_size. See describe().run_options
sort_byNo
task_idNoRead (wait_ms) or stop (cancel) a task or service
wait_msNoCapped at 30000

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.3

TDQS

A3.9/5.0
Behavior4/5

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

Beyond the annotations, it discloses several behaviors an agent could not infer: no shell is used, commands pass an execution guard, oversized output is truncated into a preview with result_id and _hint, and service mode blocks until the server is ready. The guard mention is what makes readOnlyHint=true coherent given that task_id can also stop things. It does not say what the guard rejects or how failures are reported.

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?

Five dense sentences, front-loaded with what the tool does and what it returns before the mode/task mechanics. Every sentence carries information, though the final sentence packs mode, task_id, read and stop into one line and could be split for scannability.

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?

With 13 parameters, no output schema and nested objects, the description covers the essentials: input form, output shape (parsed JSON or preview plus result_id), the continuation path, and the task/service lifecycle. The deferred options surface is acknowledged via describe().run_options, though filtering parameters such as where/select/sort_by remain unaddressed anywhere in the prose.

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 coverage is 69%, so most parameters are already documented, and the description correctly emphasizes the two that matter most: 'command' as a whole line with pipes, and 'mode' with task/service semantics plus task_id read/stop. It says nothing about cwd, args, cmd, limit, where, select, sort_by, cancel or wait_ms, and it defers the whole options bag to describe().run_options rather than adding meaning itself.

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?

The description gives a concrete verb and resource: run a command without a shell and return parsed JSON, with pipe support spelled out. The bare name 'run' carries no meaning, so the description is doing all the work, but it succeeds in distinguishing this from query_result, which it names as the continuation path rather than a duplicate.

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

Usage Guidelines4/5

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

It routes the agent explicitly: large results come back as a preview plus result_id, and the agent should continue with query_result. It also separates the three modes (wait, task, service) and states that task_id is used to read or stop a task or service. It stops short of saying when not to call run or how it relates to describe beyond a pointer to describe().run_options.

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