Skip to main content
Glama

execute

Destructive

Run shell commands locally or via SSH with isolated channels, configurable pause and total timeouts to handle long-running or silent tasks.

Instructions

Execute a command locally or over SSH in an isolated channel.
Local: just pass command (defaults to cmd.exe/bash).
SSH: also pass session_id from connect_ssh.

PARAMETER GUIDANCE: session_id selects SSH vs local; shell only
applies to local. Chain with && for multi-step; use Zellij
for persistent state. Raise pause_timeout (not total_timeout) for
quiet jobs. Raises ValueError if session_id is invalid.

WHEN NOT TO USE: respond (stdin), send_control (keys), read_output (poll).

SIDE EFFECTS: Spawns a process. Partial commands live until finished
or interrupted. TUI apps MUST start in foreground — never use &.

RETURNS:
- {"status": "completed", "output": str, "exit_code": int}
- {"status": "partial", "output": str, "command_id": str}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
shellNoShell for local execution (e.g. 'powershell.exe', '/bin/bash'); ignored for SSH
commandYesShell command to run (stateless — cd does not persist between calls)
session_idNoSSH session_id from connect_ssh; omit for local execution
pause_timeoutNoSeconds of silence before returning a partial result (> 0, ≤ total_timeout)
total_timeoutNoHard cap on call duration in seconds (≥ pause_timeout)
Behavior5/5

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

Beyond annotations (destructiveHint: true), the description adds that it spawns a process, partial commands persist until finished/interrupted, and warns that TUI apps must start in foreground, never with &. Also notes ValueError for invalid session_id.

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?

Well-structured with clear sections (PARAMETER GUIDANCE, WHEN NOT TO USE, SIDE EFFECTS, RETURNS). Each sentence adds value, no fluff. Front-loaded with the core action.

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?

For a tool with 5 parameters and no output schema, the description covers return format (including partial results), error behavior (ValueError), and execution model (stateless, isolated channel). No significant gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema covers 100% with good descriptions. The description adds interaction context: session_id selects SSH vs local, shell only applies locally, and pause_timeout vs total_timeout trade-off. This goes beyond schema but not extremely deep for each parameter.

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?

The description clearly states the tool executes a command locally or over SSH, with specific examples (cmd.exe/bash). It directly distinguishes from sibling tools like respond, send_control, and read_output in the 'WHEN NOT TO USE' section, making purpose unambiguous.

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?

Explicit guidance on when to use local vs SSH (via session_id), when not to use (listing sibling tools with reasons), and tips like chaining commands with &&, using Zellij for state, and adjusting pause_timeout over total_timeout for quiet jobs.

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/QiuwenZheng/interminal'

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