Skip to main content
Glama

Type into a terminal session

terminal_write

Send literal text, tmux key names, or Enter to a terminal session, with optional output capture. Use it to type into running interactive terminals or trigger control keys like C-c.

Instructions

Send literal text, special key names, and/or Enter to a terminal session. Multi-line or large text is pasted through a tmux buffer by default; set paste=false to force literal send-keys. Key names use tmux notation: Enter, Tab, Escape, Up, Down, Left, Right, C-c, C-d, M-x, F1, etc. Set wait_ms to return a capture in the same call.

Input Schema

NameRequiredDescriptionDefault
keysNotmux key names, e.g. ["C-c"] or ["Tab","Enter"].
inputNoLiteral text to type or paste.
pasteNoForce bracketed paste. Default: auto for multi-line/large input.
submitNoSend Enter after the input/keys. Default false.
sessionYesSession name.
wait_msNoWait before capturing output. Default 0.
read_linesNoLines captured when wait_ms > 0. Default 80.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior4/5

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

Goes beyond the annotations by disclosing the tmux-buffer paste default for multi-line/large text, the paste=false override, the tmux key-notation convention, and that wait_ms yields a capture in the same call. It does not say what happens on a missing/dead session or whether the call blocks, but the important write-path behavior is covered.

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?

Four front-loaded sentences, each carrying distinct information (what it sends, paste default, key syntax, wait_ms capture). No filler or repetition of the title.

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 7-parameter mutating tool with no output schema, the description covers the main behavior paths and the capture-in-same-call return mechanism. Minor gaps remain around failure modes (invalid session) and interaction between submit and keys, but nothing needed for a correct basic call is missing.

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 100%, so the baseline is 3; the description earns an extra point by adding the tmux key notation vocabulary (C-c, M-x, F1) and the auto-paste condition for multi-line/large input, which clarify how keys/paste/input interact beyond the terse schema strings.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (send) and resource (literal text, key names, Enter to a terminal session), which is clearly distinct from terminal_read and terminal_create. It does not explicitly contrast with run_command, the nearest sibling that also executes things in a session, so a 4 rather than a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage (type/paste into an existing session) and explains the paste vs literal send-keys choice, but never says when to use this instead of run_command or when to prefer terminal_read. No explicit alternatives or exclusions are named.

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