command_execute
Run a specified command on one MikroTik RouterOS device via SSH, with a dry-run option to preview changes before execution.
Instructions
Execute a command on one device.
Commands may be non-idempotent. When the result reports an unknown outcome, the command may already have run and must not be retried automatically.
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": "<device>",
"command": "<command>"
},
"name": "command_execute"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device | Yes | ||
| command | Yes | ||
| dry_run | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| device | Yes | ||
| status | Yes | ||
| stderr | No | ||
| stdout | No | ||
| exit_code | No | ||
| duration_ms | Yes | ||
| execution_state | Yes | ||
| stderr_truncated | No | ||
| stdout_truncated | No |