Skip to main content
Glama
gensecaihq

pfSense MCP Server

by gensecaihq

update_firewall_rule

Idempotent

Modify a firewall rule by ID with new settings for interface, protocol, source/destination, action, schedule, and more. Optionally verify description to avoid editing the wrong rule.

Instructions

Update an existing firewall rule by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceNoSource address (any, IP, network, alias name)
rule_idYesRule ID (array index from search_firewall_rules, e.g., 0, 1, 2...)
disabledNoWhether the rule is disabled
protocolNoProtocol (tcp, udp, icmp, any)
scheduleNoName of an existing firewall schedule (from search_firewall_schedules) to assign; pass "" to remove the schedule from the rule
interfaceNoInterface for the rule (wan, lan, etc.)
rule_typeNoRule type (pass, block, reject)
descriptionNoRule description
destinationNoDestination address (any, IP, network, alias name)
log_matchesNoWhether to log rule matches
source_portNoSingle port (443), range (1024-65535), or alias name
verify_descrNoSafety check — if provided, verifies the rule at this ID still has this description before updating. Prevents operating on the wrong rule after ID shifts.
destination_portNoSingle port (443), range (1024-65535), or alias name. Do NOT pass multiple space/comma-separated ports — create a port alias first instead.
apply_immediatelyNoWhether to apply changes immediately

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, and idempotentHint=true, so the basic mutation profile is known. The description adds no additional behavioral context (e.g., that rule IDs can shift, or that apply_immediately controls when changes take effect), but it does not contradict annotations.

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

Conciseness5/5

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

The description is a single, front-loaded sentence that directly states the action and object. Every word is necessary; there is zero waste or repetition.

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

Completeness3/5

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

The rich schema (14 parameters, all described) and annotations provide sufficient detail for correct invocation, including return handling via an output schema. However, the description alone lacks high-level guidance about workflow (e.g., using search_firewall_rules to obtain rule_id, or the need to apply changes separately if apply_immediately is false), making it minimally viable.

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 input schema has 100% parameter coverage, including crucial semantics like rule_id being an array index from search_firewall_rules and verify_descr as a safety check against ID shifts. The description itself adds no parameter information, so it relies entirely on the schema, which is adequate.

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?

The description uses a specific verb ('update') and resource ('existing firewall rule') with an addressing mechanism ('by ID'), making it unambiguous. It clearly distinguishes from sibling tools like create_firewall_rule_advanced, delete_firewall_rule, and move_firewall_rule.

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

Usage Guidelines3/5

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

The description implies usage (when you want to modify a rule) but does not explicitly state when to use it vs alternatives or provide prerequisites like searching for the rule first. No exclusions or when-not guidance is given.

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/gensecaihq/pfsense-mcp-server'

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