Skip to main content
Glama

terminal_exec

Runs interactive shell commands in a tmux session and returns output for monitoring or environment activation; use ssh_exec for batch commands.

Instructions

Run an INTERACTIVE command in tmux and return output. Only for interactive/monitoring use (top, watch, conda activate). For batch commands, use ssh_exec instead.

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": "terminal_exec"
  }
}

Input Schema

NameRequiredDescriptionDefault
waitNoMs to wait for output (default 1000, max 30000)
commandYesShell command to run
sessionNohpc

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.2.0

TDQS

A4.2/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full load; it does disclose the tmux-session execution model and that output is returned, which is meaningful context. It does not say whether a session is created if absent, whether the session persists after the command, how the process is terminated, or how output is truncated when wait elapses — all material for an interactive runner.

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, zero filler, with the interactive constraint and the alternative both front-loaded. Nothing to cut and nothing buried at the end.

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?

For a 3-parameter runner with no output schema, the definition covers purpose, mechanism, and routing adequately. The remaining gap is its relationship to the adjacent terminal_start/terminal_send/terminal_read siblings, which an agent may need to know to build a working interactive loop.

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 67%: command and wait are documented in the schema, while session (default "hpc") has no description anywhere. The description's mention of tmux hints at a session but adds no semantics about the session parameter's naming or reuse. Baseline 3 applies since the schema does most of the work.

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 (Run), a specific resource (an INTERACTIVE command in tmux) and the return (output). The word 'INTERACTIVE' plus the tmux mechanism distinguishes it cleanly from the batch-oriented ssh_exec sibling named in the same sentence.

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?

Gives both sides of the routing decision explicitly: use this for interactive/monitoring cases with concrete examples (top, watch, conda activate), and use ssh_exec for batch commands. An agent can pick correctly without opening either schema.

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