Skip to main content
Glama

opnsense_get_pf_statistics

Read-onlyIdempotent

Get packet filter engine counters, state table usage, and timeouts to diagnose firewall drops caused by state exhaustion or memory limits.

Instructions

Get packet filter engine statistics: state table usage, memory limits, counters and timeouts.

Read this when the firewall drops traffic under load rather than by policy. State table exhaustion and hitting a memory limit both show up here as non-zero counters, and neither produces a block entry in the firewall log, which is why load-related drops are so often misdiagnosed as rule problems.

Args: params (PfStatisticsInput): Validated input containing: - section (str): "memory", "timeouts", "interfaces" or "" for all - response_format (ResponseFormat): 'markdown' or 'json'

Returns: str: Markdown sections, or the raw JSON statistics object. Keys vary by OPNsense release; commonly present are current state count, state limit, searches, inserts, and per-reason drop counters.

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?

Beyond the readOnly/idempotent annotations, the description adds valuable behavioral context: it explains the diagnostic significance of non-zero counters, notes that load-related drops are absent from firewall logs, and warns that returned keys vary by OPNsense release. This prepares agents for interpreting results and managing variability.

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 well-structured into purpose, usage context, parameter listing, and return format. It is roughly 150 words but front-loaded with the core function, and every section earns its place without filler or 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?

Given the tool's complexity—nested parameters, multiple output formats, and release-dependent keys—the description covers purpose, parameters, return behavior, and a clear diagnostic use case. It is sufficiently complete for an agent to select and invoke the tool correctly without needing to enumerate every possible counter.

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 enumerates both parameters (section and response_format) with valid values and adds practical guidance, e.g., 'json' is better for chaining values. Though the input schema includes some descriptions, the tool description reinforces them and provides selection advice, compensating for the reported low schema coverage.

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 clearly states the tool's function: 'Get packet filter engine statistics' and lists specific elements (state table usage, memory limits, counters, timeouts). This specific verb+resource combination distinguishes it from sibling tools like opnsense_get_rule_statistics or opnsense_get_firewall_log, which focus on per-rule or per-interface data.

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?

The description explicitly directs to use this tool 'when the firewall drops traffic under load rather than by policy,' explaining why (state table exhaustion and memory limits produce non-zero counters without firewall log entries). This provides both a clear when-to-use and a distinguishing condition against rule-based drops, though it does not name a specific alternative tool.

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