Skip to main content
Glama
jaseonline

unifi-console-mcp

by jaseonline

unifi_console_doh

DestructiveIdempotent

Preview and apply DNS over HTTPS (DoH) settings on a UniFi gateway with fingerprint confirmation, DNS safety checks, and automatic rollback if resolution fails.

Instructions

Preview, then apply, a change to the gateway's DNS over HTTPS (DoH) setting. Tier C: it can stop DNS for the whole network.

Two steps, always: call with confirm=false to get a read-only preview (before, after, diff, warnings, the safety probe result, a fingerprint); call again with the same fields plus confirm=true, that fingerprint and an approval_note to apply. Fields: state (off, auto, manual or custom), server_names (manual) and custom_servers (custom); the list that does not apply is cleared, as the UI does. Before applying, DNS is tested through the gateway; if it is already failing, the change is refused. After applying, DNS is tested again and, if it fails, the previous values are put back automatically (once) and the result says applied=false with auto_restored=true. Applying also needs UNIFI_CONSOLE_ENABLE_WRITES=true and 'doh' in UNIFI_CONSOLE_WRITE_ENTITIES. SSL inspection is a separate setting and is not changed here. Every write is journalled; scripts/doh_restore.py can put the last values back from the journal.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond what the annotations declare: the mandatory preview/fingerprint/approval_note handshake, the pre-apply DNS probe that causes refusal, the one-shot auto-restore with applied=false and auto_restored=true, the env-var gate, per-write journalling and a recovery script. Nothing here is derivable from destructiveHint/idempotentHint, and the description is consistent with them.

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 two facts an agent most needs (preview-then-apply, tier C danger) before the operational detail, and almost every sentence carries non-redundant information. It is dense and slightly long, with some restatement of fields the schema already describes.

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

Completeness5/5

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

For a destructive tier-C mutation with an output schema, the description covers the workflow, the failure and rollback paths, the authorization prerequisites, and the manually-applied follow-on (restore script). An agent has everything needed to call it correctly without reading the schema.

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?

The nested schema already documents every field (state enum meanings, confirm, fingerprint, approval_note, server_names, custom_servers), so the field enumeration is largely redundant. The added value is the conditional applicability the schema lacks: server_names applies to manual, custom_servers to custom, and 'the list that does not apply is cleared, as the UI does'. action/target are left unexplained in prose.

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?

Opens with a specific verb and resource: preview then apply a change to the gateway's DNS over HTTPS (DoH) setting. The scope is unambiguous and clearly separable from siblings such as static_dns and dynamic_dns, and the first sentence also flags the blast radius ('it can stop DNS for the whole network').

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 explicit sequencing ('Two steps, always: call with confirm=false ... call again with the same fields plus confirm=true') plus prerequisites (UNIFI_CONSOLE_ENABLE_WRITES, 'doh' in UNIFI_CONSOLE_WRITE_ENTITIES) and a scope exclusion ('SSL inspection is a separate setting and is not changed here'). It never names a sibling tool to route to, so it lands at 4 rather than 5.

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