run_command
Executes a shell command on a remote server over SSH and returns stdout, stderr, and exit code.
Instructions
Execute a command on a remote server via SSH.
Runs a shell command and returns stdout, stderr, and exit code.
Parameters:
connection: Name of the connection (from list_connections)
command: The shell command to execute
timeout: Command timeout in milliseconds (default: 30000)
Example usage: run_command("web1", "uptime") Example usage: run_command("db1", "systemctl status mysql", 60000)
Returns:
stdout: Command standard output
stderr: Command standard error
code: Exit code (0 = success)
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": {
"connection": "<connection>",
"command": "<command>"
},
"name": "run_command"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | Shell command to execute | |
| timeout | No | Timeout in milliseconds (default: 30000) | |
| connection | Yes | Name of the SSH connection to use |