Skip to main content
Glama
itunified-io

mcp-opnsense

by itunified-io

opnsense_nat_apply

Apply pending NAT configuration changes in OPNsense. Required after adding, updating, or deleting NAT rules to make changes active. Destructive operation requires confirmation.

Instructions

Apply pending NAT configuration changes. Required after add/update/delete/toggle for changes to take effect. DESTRUCTIVE.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
confirmYes

Implementation Reference

  • Registration of the opnsense_nat_apply tool definition with name, description, and inputSchema (confirm required).
    {
      name: "opnsense_nat_apply",
      description:
        "Apply pending NAT configuration changes. Required after add/update/delete/toggle for changes to take effect. DESTRUCTIVE.",
      inputSchema: {
        type: "object" as const,
        properties: {
          confirm: { type: "boolean", enum: [true] },
        },
        required: ["confirm"],
      },
    },
  • Zod schema for the apply tool: validates that confirm is exactly true.
    const ApplySchema = z.object({
      confirm: ConfirmTrue("confirm must be true to apply NAT configuration"),
    });
  • Handler for opnsense_nat_apply: validates args with ApplySchema, then POSTs to /firewall/source_nat/apply to apply pending NAT changes.
    case "opnsense_nat_apply": {
      ApplySchema.parse(args);
      const result = await client.post("/firewall/source_nat/apply", {});
      return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
    }
  • Helper function that coerces string booleans and validates that the value is exactly true, used by ApplySchema.
    const ConfirmTrue = (msg: string) =>
      z.preprocess(
        (v) => (v === "true" ? true : v === "false" ? false : v),
        z.literal(true, { errorMap: () => ({ message: msg }) }),
      );
Behavior2/5

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

No annotations are provided, so the description must fully disclose behavioral traits. It only includes a vague 'DESTRUCTIVE' warning, but does not explain what is destroyed (e.g., existing NAT state, network connectivity), prerequisites (e.g., need for confirm=true), or any rate limits. The confirm parameter is present but not described. This leaves significant gaps given the destructive nature.

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 very concise, with two clear sentences and one keyword ('DESTRUCTIVE'). It is front-loaded and gets to the point quickly. However, structure could be improved by formatting or separating the warning for readability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description lacks important context for a destructive mutation tool: no mention of the confirm parameter, no explanation of what 'applying' means (e.g., reloading firewall, temporary disruption), and no output schema. While the tool is simple, the missing guidance on safe usage (e.g., confirm must be true) makes it incomplete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

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

The input schema has a single required parameter 'confirm' with enum [true], but the description does not mention it or explain its meaning (e.g., confirmation flag, irreversible action). With 0% schema description coverage, the description fails to add any value beyond the schema's basic type constraints.

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 applies pending NAT configuration changes, with a specific verb ('Apply') and resource ('NAT configuration changes'). It also distinguishes itself from sibling tools by noting it is required after add/update/delete/toggle operations, which sets it apart from other NAT-related tools like opnsense_nat_source_add.

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?

The description explicitly states it is required after add/update/delete/toggle for changes to take effect, indicating when to use it. However, it does not mention when not to use it or provide explicit alternatives, though the unique purpose among siblings implies no direct substitutes.

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

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