Skip to main content
Glama

opnsense_get_firewall_rule

Read-onlyIdempotent

Retrieve the full configuration of a firewall rule by UUID, including scheduling, state policy, logging, gateway assignment, categories, and reply-to, to inspect or reproduce the rule.

Instructions

Get every configured field of a single firewall rule by UUID.

The search tool returns a summary; this returns the full record including scheduling, state policy, logging, gateway assignment, categories and reply-to, which is what you need before changing or reproducing a rule.

Args: params (GetRuleInput): Validated input containing: - uuid (str): Rule UUID - response_format (ResponseFormat): 'markdown' or 'json'

Returns: str: Markdown field list, or JSON containing the full rule object. Enum fields are flattened from OPNsense's {"value": ..., "selected": 1} form to the selected value.

Error Handling: - Returns a not-found message when the UUID does not exist

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Annotations already indicate read-only and idempotent, but the description adds meaningful context: enum fields are flattened from OPNsense's internal format to the selected value, and a not-found message is returned for invalid UUIDs. These behaviors go beyond the annotation hints.

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 concise yet structured with clear sections (Args, Returns, Error Handling). It front-loads the core purpose and every sentence supports decision-making without redundancy.

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?

Covers input, output format, and error handling thoroughly. For a single-parameter tool with an output schema, the description is complete and even explains return value details like markdown vs JSON and field flattening.

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?

The description's Args section explains both parameters: uuid source and response_format trade-offs. The schema already provides descriptions, but the tool description adds context like 'Rule UUID from opnsense_search_firewall_rules' and that json 'returns every field the API provided'.

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 states clearly 'Get every configured field of a single firewall rule by UUID', which is specific verb+resource+scope. It also differentiates from the sibling search tool by noting 'The search tool returns a summary; this returns the full record'.

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?

Explicitly states when to use this tool: 'which is what you need before changing or reproducing a rule'. It contrasts with the search tool and provides guidance on response_format selection: 'json is better when chaining values into another call'.

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

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