Skip to main content
Glama

Execute Terminal Command

terminal_exec
Destructive

Execute one non-interactive command in an idle Bash session without adding it to history; useful for automated terminal checks while preserving manual session control.

Instructions

Execute one non-interactive command through an idle Bash prompt without adding it to Bash history; use terminal_write for raw keys or interactive programs. Never use this at a U-Boot prompt: use terminal_write for U-Boot commands, or terminal_enter_uboot to interrupt a fresh boot countdown.

Input Schema

NameRequiredDescriptionDefault
commandYesOne printable command line; control characters and embedded newlines are rejected.
session_idYesActive Session ID or short reference.
timeout_msNoOptional total execution timeout in milliseconds; default 30000, maximum 86400000.

Output Schema

NameRequiredDescriptionDefault
exit_codeYes
command_idYes
output_endYes
session_idYes
output_startYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.2

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare destructive=true, readOnly=false, idempotent=false, and openWorld=true. The description adds meaningful context beyond them: the command is non-interactive, requires an idle Bash prompt, and is not added to Bash history. It does not elaborate on destructive implications, but the annotations cover that safety profile.

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?

The definition is front-loaded with the primary purpose and constraints, then immediately names alternatives. Every clause carries actionable information with no filler.

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 destructive command-execution tool with rich annotations, full schema descriptions, and an output schema, the description covers the essential operational caveats: non-interactive use, idle prompt requirement, history suppression, and U-Boot avoidance. Nothing critical is missing for correct invocation.

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 100%, so all three parameters are already documented in the schema. The description reinforces that only one non-interactive command is allowed, but it adds no syntax or timeout details beyond the schema.

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 one non-interactive command through an idle Bash prompt. It immediately distinguishes the tool from terminal_write and terminal_enter_uboot by naming the exact contexts where those siblings are required.

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 explicit use conditions and exclusions, including the critical warning never to use it at a U-Boot prompt. It also routes the agent to the correct alternatives, terminal_write and terminal_enter_uboot, for those cases.

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