Skip to main content
Glama
lucamarien

OPNsense MCP Server

by lucamarien

opn_set_rule_categories

Assign or clear categories on an OPNsense firewall rule by UUID. Check savepoint support first on old versions to avoid lockout, and confirm changes or back up config when needed.

Instructions

Assign categories to a firewall rule by UUID with savepoint protection where supported.

Use this when you need to categorize or re-categorize a firewall rule. Savepoint protection applies on OPNsense < 26.7 only: there changes auto-revert in 60 seconds unless confirmed with opn_confirm_changes. OPNsense 26.7 removed the savepoint API upstream, so on 26.7+ changes apply immediately and are NOT rolled back automatically. Check opn_mcp_info first: if 'savepoint_support' is false, take a config backup with opn_download_config before changing rules that could lock you out.

Parameters:

  • uuid: the firewall rule UUID (from opn_list_firewall_rules)

  • categories: comma-separated category UUIDs (from opn_list_firewall_categories), or empty string to clear all categories

Returns: dict with 'revision' (str) for confirming and 'uuid' (str).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uuidYes
categoriesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations, the description fully carries the burden of behavioral disclosure. It explains savepoint auto-revert on OPNsense < 26.7, immediate persistence on 26.7+, the 60-second confirmation window with opn_confirm_changes, and lockout risk mitigation. It also discloses the return value shape, which is not specified elsewhere.

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 information-dense but well-structured, with a clear lead action, usage statement, behavioral warnings, parameter bullets, and return type. Despite its length, every sentence adds necessary context for safe invocation, especially given version-dependent behavior and no annotations.

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?

Given the tool's mutation risk, version-specific savepoint behavior, and minimal schema with no annotations, the description covers purpose, when to use, safety precautions, parameter semantics, and return values. This is fully adequate 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.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must fully compensate. It explains that 'uuid' comes from opn_list_firewall_rules and that 'categories' is a comma-separated list of category UUIDs from opn_list_firewall_categories, including the empty-string behavior to clear categories. This provides source and formatting guidance beyond the bare schema.

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 opens with a specific action and target: 'Assign categories to a firewall rule by UUID.' This clearly distinguishes it from sibling tools like opn_update_firewall_rule or opn_toggle_firewall_rule, which handle different aspects of rule management.

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?

It explicitly states 'Use this when you need to categorize or re-categorize a firewall rule' and provides preconditions, including checking opn_mcp_info and taking a backup with opn_download_config when savepoint support is unavailable. It does not explicitly name alternative tools for cases where this tool is not appropriate, but the version-specific guidance makes usage context clear.

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/lucamarien/opnsense-mcp-server'

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