Skip to main content
Glama
unifi-mcp-server

unifi-mcp-server

by PainInTheNic

Create DNS Record / Policy

unifi_create_dns_policy

Creates 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

NameRequiredDescriptionDefault
configYesFull 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.
siteIdNoSite ID (UUID from unifi_list_sites). Optional — when the console has exactly one site it is used automatically.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, idempotentHint=false and openWorldHint=true, so safety framing is covered. The description adds scope context but says nothing about the non-idempotent behavior (duplicate records on re-call), required permissions, or what a successful call returns. The redaction-refusal behavior appears only in the schema, not the description.

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

Conciseness4/5

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

Front-loaded with the purpose, then the type/field contract, then the exclusion and the recommended workflow. Dense but every sentence carries information; the parenthetical field examples are slightly cramped but not wasteful.

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 a two-parameter tool whose real complexity is a nested free-form config object, the description supplies the type discriminator and field patterns needed to call it correctly, and correctly defers return-value expectations to the companion get tool. It does not cover duplicate handling or permission prerequisites, which keeps it short of complete.

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

Parameters4/5

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

Schema coverage is 100%, giving a baseline of 3, but the description goes beyond the schema by enumerating the concrete type values (A_RECORD/AAAA_RECORD/CNAME_RECORD/MX_RECORD/SRV_RECORD/TXT_RECORD/FORWARD_DOMAIN) and giving per-type field examples. That is genuinely new meaning, since the schema leaves config as a free-form object with no enum values.

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

Purpose5/5

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

States a specific verb and resource ('Create a local DNS record or forward-domain policy') and immediately scopes it against a likely confusion ('This is local DNS record management, NOT domain blocking'). The sibling create/get/update/delete tools are implicitly distinguishable by the explicit create + DNS-policy pairing.

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?

Gives a clear positive workflow ('model it on an existing entry fetched via unifi_get_dns_policy with responseFormat=json') and an explicit exclusion (not domain blocking). It falls short of 5 because the tool that should be used for domain blocking is never named, so the agent must guess the alternative.

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

Deploy Server

Other Tools