delete_port_forward
Deletes a UniFi port forwarding rule by rule ID. Requires confirm=true because it removes external access to the specified port immediately.
Instructions
Delete a port forwarding rule.
Mutating operation: removed immediately and persisted on the UniFi console. Requires confirm=true because removing a forward closes external access. Target by rule id from get_port_forwards.
Args: rule_id: Port forward rule id to delete (from get_port_forwards). confirm: Safety gate: must be True to delete. Defaults to False. site: Site to operate on. Defaults to "default". device: Optional console name to target a specific UniFi device; omit for default.
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": {
"rule_id": "<rule_id>"
},
"name": "delete_port_forward"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site | No | Site to operate on. Defaults to "default". | default |
| device | No | Optional console name to target a specific UniFi device; omit for default. | |
| confirm | No | Safety gate: must be True to delete. Defaults to False. | |
| rule_id | Yes | Port forward rule id to delete (from get_port_forwards). |