Write To Terminal
write_to_terminalSend a command or text to a Windows terminal session and press Enter to execute it, enabling interactive shell control with separate output retrieval.
Instructions
Writes a command or text into a session's shell input, exactly as if a person typed it, then presses Enter (by default).
Args:
session (string): which session to write to (default "default"; auto-created if it doesn't exist yet, using the default shell)
command (string): text to type
pressEnter (boolean): press Enter afterward (default true)
confirm (boolean): must be true to run a command matched by the dangerous-command safety filter (see config.json's dangerousPatterns)
Returns immediately after the keystrokes are sent - it does NOT wait for the command to finish. Use read_terminal_output afterward (optionally with waitForIdleMs) to see the result.
Errors:
"matches a pattern flagged as potentially destructive" -> resend with confirm: true if you really mean it
"readOnlyMode" -> this server instance has writes disabled in config.json
"No open session named ..." -> only for non-default session names; call open_terminal_session or list_terminal_sessions first
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | The text/command to type into the terminal, e.g. "git status". Sent exactly as given, then Enter (unless pressEnter is false). | |
| confirm | No | Set true to bypass the dangerous-command safety check after you have deliberately reviewed the command. | |
| session | No | Session name to write to. Defaults to "default", which is auto-created on first use. | default |
| pressEnter | No | Whether to press Enter after typing. Set false to type partial input (e.g. answering an interactive prompt character by character). |