Write to a terminal
terminal_writeSend raw input to an existing shell session, appending a newline so commands execute; optionally wait for and return the resulting output.
Instructions
Write raw input to a running session. By default a newline is appended so the shell executes it. Set wait to true to also return the output produced by this write.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"id": "<id>",
"input": "<input>"
},
"name": "terminal_write"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Session id (for example "term_1a2b3c4d") or the friendly name given at spawn time. | |
| wait | No | Wait for output to go quiet and include the new output in the response. Default false. | |
| input | Yes | Text to send to the session stdin. | |
| idleMs | No | Consider the command finished after this many ms without new output. Default 400. | |
| newline | No | Append a newline after the input. Default true. Set false for REPLs or raw typing. | |
| timeoutMs | No | Maximum time to wait in milliseconds. Default 120000 for terminal_exec, 15000 for terminal_write, 30000 for terminal_run. |