execute_script
Run multi-line shell scripts on remote SSH servers for automation, configuration changes, or complex checks. Send script via stdin, choose shell, timeout, and host.
Instructions
Execute a multi-line shell script on the remote SSH server.
Uploads the script via stdin and runs it with the specified shell. Useful for multi-step automation, configuration changes, or complex checks.
Args: script: The full script content (multi-line bash/sh/python script). shell: Shell interpreter to use: "bash", "sh", "python3", etc. (default "bash"). timeout: Maximum seconds to wait (default 120). host_name: Named host from SSH_HOSTS config; uses default host if omitted.
Returns: Script output or error details.
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": {
"script": "<script>"
},
"name": "execute_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| shell | No | bash | |
| script | Yes | ||
| timeout | No | ||
| host_name | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |