Playwright for terminals - MCP server for AI agents to programmatically control terminal sessions
Termwright provides 8 tools with complete input schemas and descriptions. Naming follows verb_noun convention (spawn-terminal, send-input, read-output, run-command, wait-for-pattern, list-sessions, close-terminal, open-terminal-window). All tools have descriptions (avg 120 chars, within 10-1024 range). All parameters are typed and described. However, output schemas are not documented, LLMs cannot predict return structure for planning downstream calls. Error handling is absent: no guidance on retryability, recovery steps, or actionable error messages. No tool annotations (readOnlyHint, destructiveHint, idempotentHint) despite clear risk levels (WRITE, DESTRUCTIVE, READ_ONLY). Parameter descriptions lack format constraints (e.g., regex patterns for sessionId, timeout bounds). No pagination support for list-sessions despite potential for many active sessions.
Close a terminal session and clean up resources.
List all active terminal sessions.
Open or reopen a terminal emulator window for a visible (tmux) session. Use this if the window was closed or failed to spawn.
Read the current output buffer from a terminal session. Returns all output since the last clear.
Execute a command in a terminal session and wait for it to complete. Returns the command output.
Send input to a terminal session. Use this for interactive programs or when you need fine-grained control.
Spawn a new terminal session. Returns a session ID that must be used for all subsequent operations. Set visible=true to create a tmux session you can attach to with 'tmux attach -t <name>'.
Output schemas not documented. LLMs cannot predict return structure (e.g., what fields spawn-terminal returns, what run-command yields). This breaks tool chaining and forces agents to guess at response format.
No error handling guidance. Tools provide no recovery hints (e.g., 'sessionId not found, call list-sessions() to see active sessions'). Agents cannot self-correct on failures.
No tool annotations despite explicit risk levels. spawn-terminal and run-command are WRITE operations; close-terminal is DESTRUCTIVE. Missing readOnlyHint, destructiveHint, idempotentHint annotations prevent agents from reasoning about side effects and retry safety.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 55 | 2025-06-18+ | v2 |
Wait for a specific pattern to appear in the terminal output. Useful for waiting for prompts or specific output.
Parameter constraints missing. sessionId, pattern, and command parameters lack format/length constraints. timeout lacks min/max bounds (default 30000ms is stated but no range). Agents may pass invalid values without validation hints.
list-sessions lacks pagination. No limit, offset, or cursor parameters. If many sessions exist, response could explode context window. No indication of result count or truncation.