Manage WireGuard Interface
manage_wireguard_interfaceAdd, remove, enable, or disable WireGuard interfaces on MikroTik RouterOS. Idempotent by interface name; RouterOS generates the private key and returns the public key.
Instructions
Add, remove, enable, or disable a WireGuard interface. Idempotent by name. RouterOS generates the private key on create — it is never passed in. The public key is returned after creation.
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": {
"action": "<action>",
"name": "<name>"
},
"name": "manage_wireguard_interface"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mtu | No | MTU (default 1420) | |
| name | Yes | Interface name — idempotency key (e.g. wg0) | |
| action | Yes | Action to perform | |
| dryRun | No | Preview changes without applying. | |
| comment | No | Optional comment | |
| routerId | No | Router ID; omit to use the default router. | |
| listenPort | No | UDP listen port (RouterOS picks one if omitted) | |
| confirmationToken | No | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |