Skip to main content
Glama

terminal

Execute commands in a terminal and capture the output. Use the 'run' action to send a command, wait for completion, and retrieve the result in a single call.

Instructions

Purpose: Interact with a terminal window: read output, send input, or run+wait+read in one call. Details: action='run' is the recommended high-level workflow: send command → wait until quiet/pattern/timeout → read output. Returns completion={reason, elapsedMs} first-class. action='read' reads current text via UIA TextPattern (falls back to OCR); use sinceMarker for incremental diff. action='send' sends a command with focus management. Prefer: action='run' for command execution + result. Use action='read'/'send' for fine-grained control or when you need to interleave other actions. Caveats: Do not screenshot the terminal — terminal(action='read') is cheaper and structured. action='run' supports completion reasons: quiet | pattern_matched | timeout | window_closed | window_not_found. preferClipboard=true (send default) overwrites user clipboard. Examples: terminal({action:'run', windowTitle:'PowerShell', input:'npm test', until:{mode:'pattern', pattern:'npm test:'}}) → {output, completion:{reason:'pattern_matched'}} terminal({action:'run', windowTitle:'pwsh', input:'ls'}) → quiet 800ms wait, returns output terminal({action:'read', windowTitle:'PowerShell', sinceMarker:'...'}) → incremental diff terminal({action:'send', windowTitle:'PowerShell', input:'echo hello'}) → sends text + Enter

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations provided, the description carries full burden. It details behavioral traits for each action: 'run' sends command, waits until quiet/pattern/timeout, and returns output; 'read' uses UIA TextPattern with fallback to OCR and supports sinceMarker for incremental diff; 'send' sends input with focus management. It also mentions clipboard overwrite and completion reasons. This goes well beyond a minimal description.

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 description is well-structured with clear sections: Purpose, Details, Prefer, Caveats, Examples. It is concise with no wasted sentences, and front-loads the essential purpose and action overview. Every sentence adds meaningful guidance.

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?

Given the tool's complexity (three actions with different parameters) and no output schema, the description provides a complete picture: all actions, completion reasons, parameter usage, and examples. It covers what the tool does, how to use it, and important caveats (clipboard overwrite, no screenshot). No gaps are apparent.

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?

The schema has 100% description coverage, so baseline is 3. The description adds value by explaining the purpose and workflow of each action, and relates parameters like 'until' and 'sinceMarker' to the tool's behavior. However, it does not elaborate on every parameter's semantics beyond what the schema provides (e.g., 'sendOptions' and 'readOptions' are only mentioned as 'extra options'). Still, the overall context compensates, making it a 4.

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's purpose: 'Interact with a terminal window: read output, send input, or run+wait+read in one call.' It uses a specific verb ('Interact') and resource ('terminal window'), and distinguishes between three distinct actions (run, read, send). This sets a clear scope and differentiates the tool from siblings.

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?

The description provides explicit usage guidance: 'Prefer: action='run' for command execution + result. Use action='read'/'send' for fine-grained control or when you need to interleave other actions.' It also includes a negative hint: 'Do not screenshot the terminal — terminal(action='read') is cheaper and structured.' This clearly tells when and when not to use each action, and suggests alternatives.

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/Harusame64/desktop-touch-mcp'

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