Run a shell command on a device
pi_command_runExecute non-interactive shell commands on remote SSH devices as the signed-in user; returns stdout, stderr, and exit code for remote administration and diagnostics.
Instructions
Execute a non-interactive shell command on the remote device via SSH, as the signed-in user. Returns stdout, stderr, and exit_code. Use the file tools for files; a command that prompts fails or waits until timeout_ms.
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": {
"device_id": "<device_id>",
"command": "<command>"
},
"name": "pi_command_run"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | Shell command line to execute. | |
| device_id | Yes | IP address, hostname, MAC address, or device identifier of the target Raspberry Pi / SSH device. | |
| timeout_ms | No | Execution timeout in milliseconds (default 30000, max 300000). |