Create DNS Record / Policy
unifi_create_dns_policyCreates local DNS records or forward-domain policies in UniFi, supporting A, AAAA, CNAME, MX, SRV, TXT, and FORWARD_DOMAIN entries with type-specific configuration.
Instructions
Create a local DNS record or forward-domain policy. 'config' requires type (A_RECORD/AAAA_RECORD/CNAME_RECORD/MX_RECORD/SRV_RECORD/TXT_RECORD/FORWARD_DOMAIN) and enabled, plus the type-specific fields (e.g. domain + ipv4Address + ttlSeconds for A_RECORD; domain + ipAddress for FORWARD_DOMAIN). This is local DNS record management, NOT domain blocking. Easiest: model it on an existing entry fetched via unifi_get_dns_policy (responseFormat='json').
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": {
"config": "<config>"
},
"name": "unifi_create_dns_policy"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| config | Yes | Full DNS record/policy object. Required: type, enabled, plus type-specific fields (domain, ipv4Address, etc.). See unifi_get_dns_policy. A config with any value still containing "[redacted]" (how reads show credentials) is refused: put the real value in, or leave the field out. | |
| siteId | No | Site ID (UUID from unifi_list_sites). Optional — when the console has exactly one site it is used automatically. |