Run Command
run_commandExecute RouterOS console commands over SSH with an allow/deny safety policy, dry-run previews, and audit journaling; use for targeted router changes when no dedicated tool exists.
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. Journaled for audit like every write (see list_journal), but never snapshotted: arbitrary commands touch unknown config sections, so it cannot be rolled back via rollback_change — prefer a dedicated tool when one exists, and note the manual undo command in your own records.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dryRun | No | Preview the command without executing (validates allow/deny policy only) | |
| command | Yes | RouterOS console command to execute | |
| routerId | No | Router ID; omit to use the default router. | |
| confirmationToken | No | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |