Skip to main content
Glama
QiuwenZheng

interminal

by QiuwenZheng

execute

Destructive

Run shell commands locally or over SSH with configurable timeouts. Returns output and exit code for completed commands or partial output for silent periods.

Instructions

Execute a command locally or over SSH in an isolated channel.

PARAMETER RELATIONSHIPS & VALIDATION:
- `session_id` vs `shell`: `session_id` determines the execution environment. If provided (must be a valid active session), it runs over SSH and `shell` is completely ignored. If omitted, it runs locally, and `shell` (e.g., 'powershell.exe', '/bin/bash') is used.
- `pause_timeout` vs `total_timeout`: These interact to manage execution time. `pause_timeout` (must be > 0) triggers an early return if the command goes silent for that many seconds. `total_timeout` (must be >= `pause_timeout`) sets a hard wall-clock limit even if output is constantly streaming. To wait longer for a quiet command (e.g., a build), increase `pause_timeout`.
- Both timeouts accept floats but invalid ranges (e.g., pause_timeout <= 0, or total_timeout < pause_timeout) or an unknown `session_id` will raise a ValueError.

WHEN NOT TO USE: 
Do not use this to send input to an existing command (`respond`), send control keys (`send_control`), or poll a running command (`read_output`).

SIDE EFFECTS: 
Spawns a new, stateless process. `cd` or environment variables do NOT persist between calls. For persistent state, start a terminal multiplexer in the foreground. Never use `&` to background TUI apps.

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)

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed5 schema fields changedv1.0.11
    • changedInput schema / properties / command / description
      Previous value: -"Shell command to run. Each call is stateless — `cd /foo` does NOT persist. Chain with && for multi-step (e.g. 'cd /foo && ls'), or use a Zellij/tmux session for persistent state"New value: +"Shell command to run (stateless — cd does not persist between calls)"
    • changedInput schema / properties / pause_timeout / description
      Previous value: -"Seconds of output silence before returning. Controls how long to wait for a quiet command — raise this (not total_timeout) for slow-starting jobs. Must be > 0 and ≤ total_timeout"New value: +"Seconds of silence before returning a partial result (> 0, ≤ total_timeout)"
    • changedInput schema / properties / session_id / description
      Previous value: -"SSH session_id from connect_ssh. Omit (or null) for local execution. Raises ValueError if the session_id is invalid or was already disconnected"New value: +"SSH session_id from connect_ssh; omit for local execution"
    • changedInput schema / properties / shell / description
      Previous value: -"Shell for local execution (e.g. 'powershell.exe', '/bin/bash'). Only used when session_id is null — ignored for SSH. Defaults to cmd.exe on Windows, /bin/bash on Unix"New value: +"Shell for local execution (e.g. 'powershell.exe', '/bin/bash'); ignored for SSH"
    • changedInput schema / properties / total_timeout / description
      Previous value: -"Hard cap on total call duration in seconds. Only binds while output is actively streaming — a silent command returns at pause_timeout, not total_timeout. Must be ≥ pause_timeout"New value: +"Hard cap on call duration in seconds (≥ pause_timeout)"
  2. Changed5 schema fields changedv1.0.9
    • changedInput schema / properties / command / description
      Previous value: -"The shell command to execute. Each call is stateless; for persistent state (cd, venv, env vars), drive a Zellij session instead of chaining &&"New value: +"Shell command to run. Each call is stateless — `cd /foo` does NOT persist. Chain with && for multi-step (e.g. 'cd /foo && ls'), or use a Zellij/tmux session for persistent state"
    • changedInput schema / properties / pause_timeout / description
      Previous value: -"Seconds of output silence to wait before returning a partial response (default is 9.0)"New value: +"Seconds of output silence before returning. Controls how long to wait for a quiet command — raise this (not total_timeout) for slow-starting jobs. Must be > 0 and ≤ total_timeout"
    • changedInput schema / properties / session_id / description
      Previous value: -"SSH session_id returned by connect_ssh. Omit for local commands — no session needed"New value: +"SSH session_id from connect_ssh. Omit (or null) for local execution. Raises ValueError if the session_id is invalid or was already disconnected"
    • changedInput schema / properties / shell / description
      Previous value: -"Shell for local execution (e.g. 'powershell.exe', '/bin/bash'). Ignored when session_id is provided. Defaults to cmd.exe on Windows, /bin/bash on Unix"New value: +"Shell for local execution (e.g. 'powershell.exe', '/bin/bash'). Only used when session_id is null — ignored for SSH. Defaults to cmd.exe on Windows, /bin/bash on Unix"
    • changedInput schema / properties / total_timeout / description
      Previous value: -"Hard cap in seconds on the maximum duration of this call (default is 20.0)"New value: +"Hard cap on total call duration in seconds. Only binds while output is actively streaming — a silent command returns at pause_timeout, not total_timeout. Must be ≥ pause_timeout"
  3. Changed6 schema fields changedv1.0.8
    • addedInput schema / properties / session_id / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / session_id / default
      Added value: +null
    • changedInput schema / properties / session_id / description
      Previous value: -"The unique session identifier returned by connect_ssh or create_local"New value: +"SSH session_id returned by connect_ssh. Omit for local commands — no session needed"
    • removedInput schema / properties / session_id / type
      Removed value: -"string"
    • addedInput schema / properties / shell
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Shell for local execution (e.g. 'powershell.exe', '/bin/bash'). Ignored when session_id is provided. Defaults to cmd.exe on Windows, /bin/bash on Unix",
      +  "title": "Shell"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "session_id",
      -  "command"
      -]New value: +[
      +  "command"
      +]
  4. Changed1 schema field changedv1.0.5
    • changedInput schema / properties / command / description
      Previous value: -"The shell command to execute (e.g., 'ls -la' or 'npm run build'). Can chain multiple commands with && or ;"New value: +"The shell command to execute. Each call is stateless; for persistent state (cd, venv, env vars), drive a Zellij session instead of chaining &&"
  5. Changed4 schema fields changedv1.0.3
    • addedInput schema / properties / command / description
      Added value: +"The shell command to execute (e.g., 'ls -la' or 'npm run build'). Can chain multiple commands with && or ;"
    • addedInput schema / properties / pause_timeout / description
      Added value: +"Seconds of output silence to wait before returning a partial response (default is 9.0)"
    • addedInput schema / properties / session_id / description
      Added value: +"The unique session identifier returned by connect_ssh or create_local"
    • addedInput schema / properties / total_timeout / description
      Added value: +"Hard cap in seconds on the maximum duration of this call (default is 20.0)"
  6. First observedv0.1.0

TDQS

A5/5.0
Behavior5/5

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

Discloses statelessness, non-persistence of cd/env, and warnings about backgrounding. Annotations provide destructiveHint and readOnlyHint, and description adds context beyond annotations.

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: purpose, parameter relationships, when not to use, side effects, returns. Every sentence adds value; no fluff.

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?

Covers all aspects: purpose, usage guidance, behavioral traits, parameter details, return types. No gaps given the tool's complexity and absence of output schema.

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

Parameters5/5

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

Schema coverage is 100%, and description adds significant extra semantics: parameter relationships (session_id vs shell, pause_timeout vs total_timeout), validation (ValueError on invalid ranges), and defaults.

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?

Clear verb+resource+context: 'Execute a command locally or over SSH in an isolated channel.' Distinguishes from sibling tools like respond, send_control, read_output.

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 'WHEN NOT TO USE' section listing alternatives. Also explains parameter relationships and validation, guiding when to use local vs SSH.

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

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