Write To Session
write_to_sessionSends text to a running PTY session's stdin, optionally appending Enter, so you can interact with an active shell from MCP.
Instructions
Write input to a PTY session's stdin.
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": {
"session_id": "<session_id>",
"text": "<text>"
},
"name": "write_to_session"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | text to send | |
| session_id | Yes | id from start_shell_session | |
| press_enter | No | append a newline (like pressing Enter) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |