Skip to main content
Glama

unifi_create_firewall_rule

Create a UniFi firewall rule to control traffic by specifying ruleset, action, protocol, and optional source/destination addresses and ports.

Instructions

Create a firewall rule. ruleset: 'WAN_IN'|'WAN_OUT'|'WAN_LOCAL'|'LAN_IN'|'LAN_OUT'|'LAN_LOCAL'|'GUEST_IN'|'GUEST_OUT'|'GUEST_LOCAL'. action: 'accept'|'drop'|'reject'. protocol: 'all'|'tcp'|'udp'|'tcp_udp'|'icmp'. src/dst: optional IP or network address. src_port/dst_port: optional port or range (e.g. '80' or '8080:8090').

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
rulesetYes
actionNodrop
protocolNoall
site_idNodefault
enabledNo
src_addressNo
src_portNo
dst_addressNo
dst_portNo
src_firewallgroup_idsNo
dst_firewallgroup_idsNo
loggingNo
Behavior2/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It only describes parameters and their values, but omits side effects (e.g., rule activation, interaction with other rules), authorization needs, or reversibility. The agent cannot assess destructive potential or runtime behavior.

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 description is a single sentence that front-loads the purpose, but then packs many parameter explanations with semicolons. It is concise but could be better structured (e.g., bullet points) for readability. Every phrase adds value, but the density may reduce clarity.

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

Completeness2/5

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

Given 13 parameters, no output schema, and no annotations, the description is incomplete. It does not explain return values, the meaning of firewallgroup_ids, site_id context, or logging. For a create operation, typical usage context (e.g., 'this rule takes effect immediately') is missing. More details are needed for a complete understanding.

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?

The description adds meaning to 6 of 13 parameters beyond the schema (ruleset, action, protocol, src/dst addresses and ports) by listing allowed values and providing formats (e.g., port range '80' or '8080:8090'). However, it ignores parameters like site_id, enabled, and firewall group IDs, leaving gaps. Given 0% schema coverage, the description partially compensates.

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 clearly states 'Create a firewall rule' which is a specific verb+resource. It lists the main parameters and allowed values, distinguishing it from sibling tools like update_firewall_rule by naming convention. However, it could be more explicit about the resource being created.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives (e.g., update_firewall_rule). It doesn't mention prerequisites like site existence or that the rule is newly created and not for modifying existing ones. The agent must infer usage from the name alone.

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

Install Server

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/haiduongacm/unifi-ap-mcp'

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