Run any RouterOS command
mikrotik_run_commandRuns arbitrary RouterOS commands on configured MikroTik devices for diagnostics, scripts, monitoring, and configuration changes while enforcing read-only safety.
Instructions
Run an arbitrary RouterOS command, e.g. /system/script/run, /interface/ethernet/monitor (with once=yes), /ip/dhcp-server/lease/make-static, /tool/fetch. Commands that never finish (monitor, torch, ping without count) must be given once or count/duration arguments. On read-only devices only print/get/monitor/ping/traceroute style commands are allowed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | Command arguments, e.g. {"interface": "ether1", "once": true}. | |
| limit | No | Maximum rows to return (default 200). | |
| query | No | Raw API query words (for print-like commands). | |
| device | No | Name of the configured device. Defaults to the first device (see mikrotik_list_devices). | |
| command | Yes | Full command path, e.g. "/system/script/run" or "/interface/monitor-traffic". |