Skip to main content
Glama
OPNsense MCP Server

OPNsense MCP Server

by lucamarien

opn_get_config_section

Retrieve a specific OPNsense configuration section as structured JSON after scanning; auto-loads config if needed and redacts sensitive values by default.

Instructions

Get a specific configuration section as structured JSON.

Use this after opn_scan_config to drill into a specific area of the OPNsense configuration. If the config hasn't been scanned yet, it will be loaded automatically.

Available sections vary by OPNsense installation. Common sections include: system, interfaces, vlans, filter (legacy firewall rules), nat, OPNsense (MVC plugin config), unbound, dnsmasq, dhcpd, staticroutes, syslog.

The 'filter' section is particularly useful — it contains legacy GUI firewall rules that are NOT visible via opn_list_firewall_rules.

Sensitive values are redacted by default; include_sensitive=true requires OPNSENSE_ALLOW_SENSITIVE=true in the server environment. Returns: dict with 'section' name and 'data' (structured config data).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "section": "<section>"
    },
    "name": "opn_get_config_section"
  }
}

Input Schema

NameRequiredDescriptionDefault
sectionYes
include_sensitiveNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does most of it well: it discloses the implicit config-load side effect, that available sections vary per installation, and that sensitive values are redacted by default unless OPNSENSE_ALLOW_SENSITIVE=true is set server-side. The only gap is that it never states read-only/non-destructive intent outright or what happens on an invalid section name, which matters given the free-form string parameter.

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?

Purpose and the scan-then-drill workflow are front-loaded, and the section enumeration earns its space by standing in for a missing enum. The 'filter' callout paragraph is also justified, though the description runs slightly long for a two-parameter read tool.

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?

An output schema exists, so return values need not be spelled out, yet the description still notes the 'section'/'data' shape. Combined with prerequisites, redaction policy, and per-installation section variance, an agent has everything needed to call this correctly.

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?

Schema coverage is 0%, so the description must compensate, and it largely does: it enumerates common section values (system, interfaces, vlans, filter, nat, OPNsense, unbound, dnsmasq, dhcpd, staticroutes, syslog), effectively substituting for the missing enum, and it fully explains include_sensitive including the environment-variable gate. It stops short of saying whether section names are case-sensitive or how unknown names are handled.

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?

States a specific verb and resource ('Get a specific configuration section as structured JSON') and immediately scopes it against the sibling opn_scan_config, which is the closest conceptual neighbor. It also explicitly distinguishes the 'filter' section from what opn_list_firewall_rules returns, so an agent can tell exactly what data this tool uniquely exposes.

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?

Gives an explicit sequencing rule ('Use this after opn_scan_config to drill into a specific area') plus a concrete when-to-prefer-this case: filter sections holding legacy GUI rules not visible via opn_list_firewall_rules. The auto-load fallback ('If the config hasn't been scanned yet, it will be loaded automatically') removes the only precondition an agent might worry about.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools