unifi_create_dns_policy
Create a local DNS record or forward domain on UniFi for A, AAAA, CNAME, MX, SRV, or TXT entries. Guarded changes require confirm: true and preview risky hostname mismatches first.
Instructions
Create a DNS policy (official POST /dns/policies): a local A, AAAA, CNAME, MX, SRV or TXT record, or a forward domain. Easy: DNS records do not filter traffic. When UNIFI_URL names the console by hostname, a record for that hostname, or a forward of it or a parent domain, can send unifi-mcp elsewhere, so it needs confirm: true and previews first.
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": {
"type": "<type>",
"domain": "<domain>"
},
"name": "unifi_create_dns_policy"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | No | SRV_RECORD: the port | |
| site | No | Site name, id or reference; optional while the console has a single site | |
| text | No | TXT_RECORD: the text | |
| type | Yes | Record type | |
| domain | Yes | The domain the record is for | |
| weight | No | SRV_RECORD: the weight | |
| confirm | No | Must be true to carry out a guarded change; without it the tool only previews it | |
| enabled | No | Whether the record is served | |
| service | No | SRV_RECORD: the service | |
| priority | No | MX/SRV_RECORD: the priority | |
| protocol | No | SRV_RECORD: the protocol | |
| ipAddress | No | FORWARD_DOMAIN: the DNS server to forward to | |
| ttlSeconds | No | Time to live (A, AAAA, CNAME) | |
| ipv4Address | No | A_RECORD: the IPv4 address | |
| ipv6Address | No | AAAA_RECORD: the IPv6 address | |
| serverDomain | No | SRV_RECORD: the server | |
| targetDomain | No | CNAME_RECORD: the target | |
| mailServerDomain | No | MX_RECORD: the mail server |