Skip to main content
Glama

unifi_update_dns_policy

DestructiveIdempotent

Update fields of a UniFi DNS policy by ID or domain, preview changes unless confirm is true, and delete/recreate to change record type.

Instructions

Change fields of a DNS policy (found by id or domain); the tool reads it, merges and PUTs the whole record. Its type can't change: delete and recreate. Always needs confirm: true; without it the tool previews the changed fields.

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": {
      "dnsPolicy": "<dnsPolicy>"
    },
    "name": "unifi_update_dns_policy"
  }
}

Input Schema

NameRequiredDescriptionDefault
portNoSRV_RECORD: the port
siteNoSite name, id or reference; optional while the console has a single site
textNoTXT_RECORD: the text
domainNoThe domain the record is for
weightNoSRV_RECORD: the weight
confirmNoMust be true to carry out a guarded change; without it the tool only previews it
enabledNoWhether the record is served
serviceNoSRV_RECORD: the service
priorityNoMX/SRV_RECORD: the priority
protocolNoSRV_RECORD: the protocol
dnsPolicyYesDNS policy id, or its domain
ipAddressNoFORWARD_DOMAIN: the DNS server to forward to
ttlSecondsNoTime to live (A, AAAA, CNAME)
ipv4AddressNoA_RECORD: the IPv4 address
ipv6AddressNoAAAA_RECORD: the IPv6 address
serverDomainNoSRV_RECORD: the server
targetDomainNoCNAME_RECORD: the target
mailServerDomainNoMX_RECORD: the mail server

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4.1/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the annotations (destructiveHint=true, idempotentHint=true), the description discloses the actual write mechanics: the tool reads the existing record, merges changes, and PUTs the whole record. It also adds two behaviors the annotations cannot express: the record type is immutable, and without confirm the call is a dry-run preview rather than a mutation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tight sentences, front-loaded with the core action and mechanism, followed by the two critical constraints (type immutability, confirm gate). No filler or repeated schema content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 18-parameter mutation with no output schema, the description covers the essentials: merge semantics, the guard flag, and the immutability rule the schema cannot express. It does not mention permission requirements or what the preview response contains, which an agent might still need to know.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3; the schema already documents every field including the confirm gate. The description adds that the dnsPolicy identifier accepts either an id or a domain and that merge semantics apply to unspecified fields, but those are broad hints rather than field-level clarification.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource ('Change fields of a DNS policy') and explains the implementation approach (read, merge, PUT the whole record) plus lookup by id or domain. It implicitly gestures at the create/delete siblings through the 'delete and recreate' note, but never names them, so differentiation is inferential rather than explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives a clear conditional rule: use this tool for field changes, but when the record type must change, delete and recreate instead. It also states the confirm: true requirement for executing versus previewing. It stops short of explicitly naming unifi_delete_dns_policy/unifi_create_dns_policy as the alternatives, so the routing is implied rather than spelled out.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.