set_firewall_policy_enabled
Enable or disable a UniFi zone-based firewall policy by ID. Applies instantly and persists on the console, toggling predefined controller policies.
Instructions
Enable or disable a zone-based firewall policy.
Mutating operation: applied immediately and persisted on the UniFi console. Targets the policy by id from get_firewall_policies. Predefined controller policies can be toggled but not deleted. Inspect state with get_firewall_policies.
Args: policy_id: Policy id to toggle (from get_firewall_policies). enabled: True to enable, False to disable. 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": {
"policy_id": "<policy_id>",
"enabled": "<enabled>"
},
"name": "set_firewall_policy_enabled"
}
}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. | |
| enabled | Yes | True to enable, False to disable. | |
| policy_id | Yes | Policy id to toggle (from get_firewall_policies). |