wireguard_create_interface
Create or update a WireGuard interface on MikroTik RouterOS with a tunnel IP, key source, name, and listen port, validated against existing subnets.
Instructions
Create (or update) a WireGuard interface. All values come from the user.
address (REQUIRED, ask the user, never invent): the router's tunnel IP with mask, as '10.10.10.1/24' or '10.10.10.1 255.255.255.0'. Validated and checked for overlap with the router's existing subnets. private_key_source (REQUIRED, ask the user): 'router' = RouterOS creates the interface's own key (never leaves the router). 'user' = the user enters an existing private key (e.g. rebuilding a tunnel). Leave private_key empty: it is entered in a local popup on apply. wg_name, listen_port (REQUIRED, ask the user; RouterOS commonly uses 13231).
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": {
"address": "<address>",
"private_key_source": "<private_key_source>",
"wg_name": "<wg_name>",
"listen_port": "<listen_port>"
},
"name": "wireguard_create_interface"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | router | |
| address | Yes | ||
| dry_run | No | ||
| wg_name | Yes | ||
| listen_port | Yes | ||
| private_key | No | ||
| trust_as_lan | No | ||
| rollback_minutes | No | ||
| allow_in_firewall | No | ||
| private_key_source | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |