Skip to main content
Glama

run_command

Destructive

Executes a shell command in an open Termius session, waits for the prompt, and returns only the command output. Handles timeouts by returning partial output so you can follow up.

Instructions

EXECUTE a shell command on the remote host in the open Termius session, wait for the prompt to return, and return only the command's output (echo and prompt removed). If it is still running or waiting for input at timeout, returns what it has so far with a status line; use read_terminal / send_key('ctrl-c') to follow up. The tab must be claimed by this session first (claim_terminal).

Input Schema

NameRequiredDescriptionDefault
commandYes
sessionNo
timeoutNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the destructive/openWorld annotations: it discloses that the call blocks until the prompt returns, that output is post-processed (echo and prompt removed), and exactly what comes back on timeout. The claim_terminal ownership requirement is a real behavioral constraint an agent must know before calling.

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?

Three tight sentences, front-loaded with the action and result contract, then the timeout branch, then the prerequisite. No filler and nothing requiring a second read.

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?

An output schema exists, so return values need not be described, and annotations already flag the destructive/open-world nature. The only real gap is the unexplained `session` parameter and no note on what permissions or host-side state the command runs under.

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 0%, so the description carries the burden. It explains timeout behavior well (partial output plus a status line when still running or waiting for input) and implies what `command` is, but the `session` parameter is never explained (default null, presumably the claimed/current session).

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?

States a specific verb and resource ('EXECUTE a shell command on the remote host') plus the execution model (waits for prompt, returns only command output with echo and prompt stripped). This clearly separates it from sibling primitives like send_text, send_key, and read_terminal, which do not wait for completion or return cleaned output.

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?

Gives an explicit precondition ('The tab must be claimed by this session first (claim_terminal)') and routes the timeout case to specific alternatives ('use read_terminal / send_key("ctrl-c") to follow up'). It stops short of saying when to prefer send_text/read_terminal over run_command for genuinely interactive programs, so not a full when/when-not statement.

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