Run a RouterOS command over SSH
mikrotik_execExecute a single RouterOS command over SSH on a MikroTik router and get its output, with a read-only guard preventing changes.
Instructions
Run a single RouterOS command on a configured router over SSH and return its output. Stateless: each call opens a fresh connection and closes it before returning, so there is no session, working directory or shell state carried between calls — send absolute command paths such as '/system resource print'. Profiles are read-only by default, in which case commands that would change the router are refused before connecting. Use mikrotik_list_profiles to find profile names.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | RouterOS command, e.g. '/system resource print' or '/ip address print detail'. | |
| profile | Yes | Profile name from mikrotik_list_profiles. | |
| timeoutMs | No | Override the profile's timeout for this call. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| stderr | Yes | ||
| stdout | Yes | ||
| exitCode | Yes | ||
| durationMs | Yes | ||
| hostKeyFingerprint | No |