Skip to main content
Glama
hugo94z

mcp-interactive-terminal

by hugo94z

terminal_exec

Run one-shot non-interactive Windows commands and return output and exit code; use interactive start/send tools for prompts, TUIs, or persistent shells.

Instructions

Run a one-shot command to completion and return its output and exit code.

Use this for non-interactive commands. Use terminal_start + terminal_send for programs that need input, a TUI, or a persistent shell.

Args: command: Command line to execute. shell: "powershell", "pwsh" or "cmd". cwd: Working directory. Defaults to the server's current directory. env: Extra environment variables. timeout_ms: Kill the command after this long. max_chars: Maximum output characters returned.

Returns: output, exit_code, timed_out, duration_ms, truncated.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNo
envNo
shellNopowershell
commandYes
max_charsNo
timeout_msNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the return fields (output, exit_code, timed_out, duration_ms, truncated), that timeout_ms kills the command, and that max_chars can truncate output. It does not discuss permissions, side effects of arbitrary command execution, or whether partial output survives a timeout kill.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the one-shot semantics before the routing advice, then uses compact Args/Returns lists with no filler. The Returns line is terse (bare field names) but earns its place since no output schema exists.

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 six-parameter, unannotated, output-schema-less command runner this covers purpose, routing, all parameters, and the return shape. Remaining gaps are edge cases: partial-output behavior on timeout and environment merge semantics.

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 coverage is 0%, so the description must compensate, and it does: it names all six parameters, states cwd defaults to the server's directory, and supplies the shell enum values ('powershell', 'pwsh', 'cmd') that the schema omits. It stops short of details like whether env is merged with or replaces the inherited environment.

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 ('Run a one-shot command to completion') plus the return artifacts, and explicitly separates itself from the persistent-shell siblings. An agent can choose between terminal_exec and terminal_start/terminal_send without opening any schema.

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?

'Use this for non-interactive commands. Use terminal_start + terminal_send for programs that need input, a TUI, or a persistent shell' gives both the when and the when-not with named alternatives. Nothing about routing is left to inference.

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