session_exec
Execute a command in a temporary terminal session and return the output. The session is automatically cleaned up, removing the need for manual resource management.
Instructions
Execute a command in a temporary session and return the output. The session is automatically cleaned up after execution.
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": {
"exec": "<exec>"
},
"name": "session_exec"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cols | No | Terminal width in columns | |
| exec | Yes | Command to execute in the session | |
| rows | No | Terminal height in rows | |
| command | No | Shell to use (default: bash) | bash |
| timeout | No | Seconds to wait for command output | |
| truncation | No | Truncation mode for output |