Skip to main content
Glama
jaseonline

unifi-console-mcp

by jaseonline

unifi_console_port_forward

Destructive

Preview and apply UniFi console internet-to-LAN port forward changes with a read-only diff, fingerprint confirmation, verification, and rollback details.

Instructions

Preview, then apply, a change to the console's port forwards (internet-to-LAN rules).

Two steps, always: call with confirm=false to get a read-only preview (before, after, diff, warnings, a fingerprint); call again with the same fields plus confirm=true and that fingerprint to apply. The rule is re-read first, so a stale preview is refused. Applying also needs UNIFI_CONSOLE_ENABLE_WRITES=true and 'port_forward' in UNIFI_CONSOLE_WRITE_ENTITIES. A new rule is created disabled; enabling one exposes a host to the internet and the preview says exactly what. After applying, the rule is read back and the result reports verified true/false, the diff, and the exact rollback call. Every write is journalled.

Input Schema

NameRequiredDescriptionDefault
paramsYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and idempotentHint=false, and the description goes well beyond them: the rule is re-read before apply, a new rule is created disabled, enabling exposes a host to the internet, the result reports verified true/false with a diff, an exact rollback call is returned, and every write is journalled. That is exactly the mutation-risk context an agent needs.

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?

The purpose leads, then a single dense paragraph of prerequisites, workflow, and safety consequences. Every sentence carries information, but the block is long enough that a little structural separation (e.g. the env-var requirement on its own line) would improve scanability.

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, non-idempotent write tool this covers the full lifecycle: preview, fingerprint guard, required env flags, verification read-back, and rollback. An output schema exists, so return shape need not be restated, and nothing an agent needs to call it correctly is missing.

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?

Reported top-level schema coverage is 0% (the single 'params' object carries no description), but the description compensates by explaining the confirm/fingerprint coupling, the create-only nature of enabled, and the safety meaning of enabling a rule. It adds real semantics, though it does not enumerate the field-level parameters the nested schema already documents.

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?

States a specific verb pair (preview then apply) and a precise resource: the console's port forwards, glossed as internet-to-LAN rules. That resource is unambiguous against every sibling (firewall_policy, wan, static_dns), so an agent can route correctly, though the description never explicitly contrasts itself with a neighbouring tool.

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

Usage Guidelines5/5

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

It prescribes the exact call sequence (confirm=false first, then confirm=true with the fingerprint), states prerequisites (UNIFI_CONSOLE_ENABLE_WRITES=true and 'port_forward' in UNIFI_CONSOLE_WRITE_ENTITIES), and explains what happens when preconditions fail (stale preview refused). This is explicit when/when-not guidance, not inference.

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