update_wireguard_peer
Modify an existing WireGuard peer's allowed addresses, endpoint, keepalive, or enabled state on a MikroTik router.
Instructions
Updates an existing WireGuard peer's allowed addresses, endpoint, keepalive, or enabled state.
Notes: peer_id: "*N" or "N" from list output e.g. "*2" allowed_address: CIDR, comma-separated e.g. "10.0.0.2/32" or "10.0.0.0/24,192.168.0.0/24" persistent_keepalive: seconds as string e.g. "25" Pass "" for endpoint_address or preshared_key to clear them.
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": {
"peer_id": "<peer_id>"
},
"name": "update_wireguard_peer"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device | No | ||
| comment | No | ||
| peer_id | Yes | ||
| disabled | No | ||
| endpoint_port | No | ||
| preshared_key | No | ||
| allowed_address | No | ||
| endpoint_address | No | ||
| persistent_keepalive | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |