terminal_operate
Unify host-terminal operations by creating sessions, sending input, and retrieving output with automatic position tracking across multiple shell types.
Instructions
Unified host-terminal operations: create sessions, send input, and get output with automatic position tracking. Creation and input are unavailable in restrictive sandbox mode.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | No | Input to send to terminal. Can be partial input or complete command. | |
| command | No | Command to execute in a terminal. Terminal creation and input are unavailable in restrictive mode. | |
| execute | No | Whether to press Enter after sending input (execute command) | |
| send_to | No | Program guard target to ensure input is sent to the correct process. Can be process name, path, "pid:12345", "sessionleader:", or "*" for any process. | |
| dimensions | No | Terminal dimensions. For new terminals: initial size. For existing terminals: resize if different from current size. | |
| get_output | No | Whether to retrieve terminal output after operations | |
| shell_type | No | Shell type for new terminal | bash |
| force_input | No | Force input even if unread output exists. Default: false (input rejected if unread output exists). | |
| terminal_id | No | Existing terminal ID to use. If not provided, creates a new host terminal when command is specified. Creation is unavailable in restrictive mode. | |
| include_ansi | No | Include ANSI codes in output | |
| output_lines | No | Number of output lines to retrieve | |
| session_name | No | Name for new terminal session | |
| control_codes | No | Whether to interpret input as control codes | |
| response_level | No | Response detail level: minimal (only essential data, fastest), standard (balanced info for most use cases), full (complete details, maximum information) | standard |
| output_delay_ms | No | Delay in milliseconds before retrieving output (allows command to complete) | |
| working_directory | No | Working directory for new terminal | |
| return_terminal_info | No | Include terminal information in response | |
| environment_variables | No | Environment variables for new terminal |