Skip to main content
Glama

delete_port_forward

Destructive

Deletes a UniFi port forwarding rule by rule ID. Requires confirm=true because it removes external access to the specified port immediately.

Instructions

Delete a port forwarding rule.

Mutating operation: removed immediately and persisted on the UniFi console. Requires confirm=true because removing a forward closes external access. Target by rule id from get_port_forwards.

Args: rule_id: Port forward rule id to delete (from get_port_forwards). confirm: Safety gate: must be True to delete. Defaults to False. site: Site to operate on. Defaults to "default". device: Optional console name to target a specific UniFi device; omit for default.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
siteNoSite to operate on. Defaults to "default".default
deviceNoOptional console name to target a specific UniFi device; omit for default.
confirmNoSafety gate: must be True to delete. Defaults to False.
rule_idYesPort forward rule id to delete (from get_port_forwards).
Install Server

TDQS

A4/5.0
Behavior5/5

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

Annotations only declare destructiveHint=true, so the description carries the burden of explaining behavior. It adds valuable context: removal is immediate and persisted on the console, confirm=true is a mandatory safety gate, and deleting closes external access. This goes well beyond the annotation and gives the agent a clear mental model of consequences.

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

Conciseness3/5

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

The intro is front-loaded and informative, covering mutation behavior, consequences, and the confirm requirement in three concise sentences. However, the entire Args section duplicates the schema's parameter descriptions without adding new information, so not every part of the description earns its place.

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?

The description covers all essential call decisions: required rule_id, confirm safety gate, site/device defaults, and the source of the rule id. With no output schema, it does not describe return values, but for a guarded delete operation the provided behavioral and parameter context is sufficient for an agent to select and invoke the tool correctly.

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 Args section repeats the schema descriptions nearly verbatim and adds no new meaning beyond what is already in the input schema. The only framing benefit is connecting rule_id to get_port_forwards, which the schema already mentions.

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 opens with a specific verb and resource ('Delete a port forwarding rule') and clarifies that the rule is targeted by id from get_port_forwards. This clearly identifies the operation, but it never explicitly names sibling tools like create_port_forward or get_port_forwards as alternatives, so it stops short of directly differentiating among them.

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?

The description gives clear invocation context: it is a mutating delete that requires confirm=true because it closes external access, and the target id comes from get_port_forwards. It does not include explicit when-not-to-use guidance or name alternatives, but for a delete tool the usage context is strong enough to guide selection.

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

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mikeholownych/unifi-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server