Skip to main content
Glama

terminal_send

Send commands to terminal windows by focusing the window, typing text, and pressing Enter. Use clipboard paste for IME-safe text entry and restore focus to the previous window after sending.

Instructions

Send a command to a terminal window (Windows Terminal, conhost, PowerShell, cmd, WSL). Wraps focus_window + keyboard type + Enter. preferClipboard=true (default) uses clipboard paste — IME-safe for CJK text, but overwrites the user's clipboard. restoreFocus=true (default) returns focus to the previously active window after sending. Caveats: If the terminal is busy (previous command still running), text will be injected mid-stream — check terminal_read first or use wait_until(terminal_output_contains) to confirm completion before sending.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
windowTitleYesPartial title of the terminal window.
inputYesText to send (max 10,000 chars).
pressEnterNoPress Enter after typing (default true).
focusFirstNoFocus the terminal before sending (default true).
restoreFocusNoRestore the previously-focused window after sending (default true).
preferClipboardNoUse clipboard paste (typeViaClipboard) — IME/long-text safe (default true).
pasteKeyNoPaste key combo. 'auto' picks ctrl+shift+v for WSL/bash/mintty/wezterm/alacritty, ctrl+v elsewhere. Only used when preferClipboard=true.auto
forceFocusNoWhen true, bypass Windows foreground-stealing protection via AttachThreadInput before focusing the terminal window. Default: follows env DESKTOP_TOUCH_FORCE_FOCUS (default false).
trackFocusNoWhen true (default), detect if focus was stolen after sending. Reports focusLost in the response.
settleMsNoMilliseconds to wait after sending before checking foreground window (default 300).
Behavior5/5

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

With no annotations provided, the description carries the full burden and delivers comprehensive behavioral disclosure. It explains the multi-step implementation ('Wraps focus_window + keyboard type + Enter'), details clipboard behavior and safety implications ('overwrites the user's clipboard'), describes focus restoration logic, and warns about text injection risks during busy states. This goes well beyond basic functionality to cover practical constraints and side effects.

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 perfectly structured and concise. It starts with the core purpose, immediately explains the implementation approach, lists key default behaviors with their implications, and ends with critical caveats. Every sentence adds essential information with zero redundancy, making it easy for an agent to parse and apply.

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 complex 10-parameter tool with no annotations and no output schema, the description provides exceptional completeness. It covers the tool's purpose, implementation details, behavioral characteristics (clipboard overwriting, focus management, busy state risks), usage recommendations, and references to related tools. This gives the agent everything needed to use the tool correctly despite the lack of structured metadata.

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 the baseline is 3. The description adds meaningful context by explaining the purpose of preferClipboard ('IME-safe for CJK text') and restoreFocus ('returns focus to the previously active window'), which helps the agent understand why these parameters matter beyond their technical definitions. However, it doesn't elaborate on all 10 parameters, keeping it at 4 rather than 5.

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 with a specific verb ('Send a command') and resource ('to a terminal window'), explicitly listing supported terminal types. It distinguishes from siblings like terminal_read by focusing on sending input rather than reading output, and from keyboard_type by wrapping additional window management functionality.

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 excellent usage guidance with explicit when-to-use recommendations ('check terminal_read first or use wait_until(terminal_output_contains) to confirm completion before sending') and clear caveats about terminal busy states. It also references sibling tools (terminal_read, wait_until) as alternatives/precursors, giving the agent specific operational context.

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