Run Command
run_commandExecute RouterOS console commands on MikroTik routers via SSH, with built-in security policies to block destructive actions and confirm high-risk operations.
Instructions
Execute an arbitrary RouterOS console command via SSH. Guarded by an allow/deny policy (built-in deny list blocks destructive commands; tighten via cmdAllow in routers.yaml or MIKROMCP_CMD_ALLOW). Prefer dedicated tools (reboot, etc.) where available. Output capped at 4000 characters.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| routerId | No | Router ID; omit to use the default router. | |
| command | Yes | RouterOS console command to execute | |
| dryRun | No | Preview the command without executing (validates allow/deny policy only) | |
| confirmationToken | No | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |