remove_wireguard_peer
Delete a WireGuard peer from a MikroTik interface by public key or comment. Preview the removal with confirm=False before confirming to apply changes.
Instructions
Remove a WireGuard peer (/interface/wireguard/peers remove)
from interface, resolved by public_key or comment (public_key
tried first if both are given). At least one of the two must be
given.
WRITE tool, guarded: blocked entirely unless the server is running with MIKROTIK_ALLOW_WRITE=true. Call with confirm=False (the default) to preview what would be removed without changing anything; call again with confirm=True to actually remove it. Errors clearly if nothing matches, or if more than one peer still matches (AmbiguousResourceError) - never guesses which one to remove.
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": {
"device_name": "<device_name>",
"interface": "<interface>"
},
"name": "remove_wireguard_peer"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| comment | No | ||
| confirm | No | ||
| interface | Yes | ||
| public_key | No | ||
| device_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||