Skip to main content
Glama
itunified-io

mcp-opnsense

by itunified-io

opnsense_firmware_reboot

Reboot the OPNsense firewall to apply firmware updates or resolve system issues. Requires explicit confirmation due to network outage.

Instructions

Reboot the OPNsense system. Causes a network outage on the firewall and any services it provides (DNS, DHCP, VPN). DESTRUCTIVE: requires explicit confirmation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
confirmYesMust be true to confirm the reboot

Implementation Reference

  • The handler for the opnsense_firmware_reboot tool. It validates the 'confirm' parameter via RebootSchema, then POSTs to '/core/firmware/reboot' via the OPNsense REST API client.
    case "opnsense_firmware_reboot": {
      RebootSchema.parse(args);
      const result = await client.post("/core/firmware/reboot");
      return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
    }
  • The Zod schema (RebootSchema) that validates the 'confirm' parameter must be the literal boolean true. Uses ConfirmTrue helper that coerces 'true' string to boolean true before validation.
    const RebootSchema = z.object({
      confirm: ConfirmTrue("confirm must be true to proceed with the reboot"),
    });
  • The tool definition registration in the firmwareToolDefinitions array. Defines the tool's name, description, and inputSchema (confirm boolean). This is exported and then added to the allToolDefinitions array in src/index.ts.
    {
      name: "opnsense_firmware_reboot",
      description:
        "Reboot the OPNsense system. Causes a network outage on the firewall and any services it provides (DNS, DHCP, VPN). DESTRUCTIVE: requires explicit confirmation.",
      inputSchema: {
        type: "object" as const,
        properties: {
          confirm: {
            type: "boolean",
            description: "Must be true to confirm the reboot",
            enum: [true],
          },
        },
        required: ["confirm"],
      },
    },
  • The ConfirmTrue helper used by RebootSchema. It preprocesses input by coercing the string 'true' to a boolean true (for MCP transport serialization), then validates that the value is the literal true.
    const ConfirmTrue = (msg: string) =>
      z.preprocess(
        (v) => (v === "true" ? true : v === "false" ? false : v),
        z.literal(true, { errorMap: () => ({ message: msg }) }),
      );
  • src/index.ts:66-66 (registration)
    The handler registration in src/index.ts - maps the tool name 'opnsense_firmware_reboot' (via firmwareToolDefinitions) to the handleFirmwareTool handler function.
    for (const def of firmwareToolDefinitions) toolHandlers.set(def.name, handleFirmwareTool);
Behavior4/5

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

No annotations are provided, so the description carries full burden. It discloses the network outage and destructive nature with confirmation requirement. However, it does not mention if the reboot is synchronous or what the response is.

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?

Two sentences, no wasted words, front-loaded with the action and consequences.

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

Completeness4/5

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

For a simple reboot tool, the description covers purpose, consequences, and required confirmation. It lacks details on return value, but output schema is absent, so that gap is acceptable.

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

Parameters3/5

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

Schema coverage is 100%, so baseline is 3. The description adds value by linking 'confirm' to the destructive nature, but does not elaborate beyond what the schema already states.

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 'Reboot the OPNsense system' with a specific verb and resource. It distinguishes itself from siblings by being the only reboot tool listed, and mentions consequences like network outage.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies use when a reboot is needed and warns of destructive effects, but lacks explicit guidance on when to use this tool vs alternatives or when not to use it.

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