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.
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 | |||