Skip to main content
Glama

opnsense_kill_states

Destructive

Drop active firewall connection states for a specific address or subnet to force reconnections or terminate compromised sessions.

Instructions

Drop tracked connection states matching an address or subnet.

Requires OPNSENSE_ALLOW_WRITE=true. This takes effect immediately and cannot be undone: every matching connection is torn down, and clients see it as a dropped session. It does not change policy, so if a rule still permits the traffic the client will simply reconnect.

Legitimate uses are forcing a host back through a changed rule set, and cutting an active session from a compromised device. It is not a way to block a host; add the address to a blocked alias with opnsense_update_alias_entries for that.

A wildcard filter is rejected. Flushing the entire state table drops every connection through the firewall simultaneously, which is a decision for a human at a console.

Args: params (KillStatesInput): Validated input containing: - filter (str): Address or subnet whose states to drop (required) - response_format (ResponseFormat): 'markdown' or 'json'

Returns: str: Confirmation including how many states were dropped, or JSON: {"filter": str, "dropped": int, "result": str}

Error Handling: - Returns a write-disabled explanation when OPNSENSE_ALLOW_WRITE is not set - Rejects wildcard filters during input validation

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?

The description goes well beyond the annotations (destructiveHint=true) by disclosing that it 'takes effect immediately and cannot be undone,' that it tears down every matching connection, that it does not change policy so clients may reconnect, and that OPNSENSE_ALLOW_WRITE is required. It also reveals rejection of wildcard filters, adding critical safety context not present in structured fields.

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

Conciseness4/5

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

The description is longer than minimal, but every section earns its place: core action, requirements, side effects, use cases, exclusions, args, return, and error handling. It is well-structured with a clear flow, though slightly verbose in the danger warnings which could be condensed without losing value.

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?

For a destructive, non-idempotent tool with a single parameter, the description is remarkably complete. It covers prerequisites, immediate effects, reversibility (or lack thereof), policy interactions, legitimate use cases, alternative tool usage, rejected inputs, return format, and error handling. The output schema further clarifies return values, but the description already does so thoroughly.

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?

Despite the 0% schema coverage signal, the description provides detailed parameter semantics: 'filter (str): Address or subnet whose states to drop (required)' and 'response_format (ResponseFormat): 'markdown' or 'json'' with an explanation of when each format is preferable. It even includes example IP/subnet values in the schema but the description enriches the meaning.

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 verb and resource: 'Drop tracked connection states matching an address or subnet.' This precisely distinguishes the tool from read-only siblings like opnsense_query_firewall_states and from opnsense_update_alias_entries, which is explicitly mentioned as the alternative for blocking.

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?

It clearly states when to use: 'Legitimate uses are forcing a host back through a changed rule set, and cutting an active session from a compromised device.' It also explicitly says when not to use it: 'It is not a way to block a host; add the address to a blocked alias with opnsense_update_alias_entries for that,' and warns against flushing the entire state table.

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