Skip to main content
Glama
itunified-io

mcp-opnsense

by itunified-io

opnsense_sys_backup_revert

Revert OPNsense to a previous configuration backup by specifying the backup ID. Destructive operation that replaces the running config.

Instructions

Revert OPNsense configuration to a previous backup. DESTRUCTIVE: replaces the running config with the specified backup.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
backup_idYesBackup ID to revert to (e.g. 'config-1773423430.7934.xml'). Use opnsense_sys_backup_list to see available backups.

Implementation Reference

  • Handler for opnsense_sys_backup_revert: parses args with BackupRevertSchema, then POSTs to /core/backup/revertBackup/{backup_id} to revert configuration.
    case "opnsense_sys_backup_revert": {
      const parsed = BackupRevertSchema.parse(args);
      const result = await client.post(
        `/core/backup/revertBackup/${encodeURIComponent(parsed.backup_id)}`,
      );
      return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
    }
  • BackupRevertSchema: Zod validation requiring a non-empty 'backup_id' string.
    const BackupRevertSchema = z.object({
      backup_id: z.string().min(1, "Backup ID is required (e.g. 'config-1773423430.7934.xml')"),
    });
  • Tool definition registration: name 'opnsense_sys_backup_revert', description, and input schema with required backup_id.
    {
      name: "opnsense_sys_backup_revert",
      description:
        "Revert OPNsense configuration to a previous backup. DESTRUCTIVE: replaces the running config with the specified backup.",
      inputSchema: {
        type: "object" as const,
        properties: {
          backup_id: {
            type: "string",
            description:
              "Backup ID to revert to (e.g. 'config-1773423430.7934.xml'). Use opnsense_sys_backup_list to see available backups.",
          },
        },
        required: ["backup_id"],
      },
    },
  • src/index.ts:64-64 (registration)
    Registers handleSystemTool as the handler for all system tool definitions (including opnsense_sys_backup_revert) in the toolHandlers map.
    for (const def of systemToolDefinitions) toolHandlers.set(def.name, handleSystemTool);
Behavior4/5

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

With no annotations, the description fully carries the burden. It clearly states the tool 'replaces the running config with the specified backup' and marks it as 'DESTRUCTIVE', which is strong behavioral disclosure. It does not mention potential side effects like reboot or impact on services, but for a simple revert operation it is adequate.

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: the first immediately conveys the purpose, the second adds the critical destructive warning and a practical hint. No superfluous words. The structure is front-loaded with the most important information first.

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?

Given the tool's simplicity (single parameter, no output schema), the description is nearly complete. It covers purpose, destructive behavior, and parameter sourcing. It could be improved by mentioning what the agent should expect after execution (e.g., success message or verification steps), but overall it is sufficient.

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 input schema has 100% coverage for its single parameter, 'backup_id'. The description adds meaning beyond the schema by directing the agent to use opnsense_sys_backup_list to find available backup IDs, and the schema itself provides a format example. This combination effectively guides parameter usage.

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 action 'Revert' on the resource 'OPNsense configuration' and specifies the scope 'to a previous backup'. It distinguishes itself from siblings like opnsense_sys_backup_list (listing) and opnsense_sys_backup_download (downloading) by indicating the destructive nature.

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 implies when to use (to revert config) and gives a clear prerequisite: 'Use opnsense_sys_backup_list to see available backups.' It explicitly labels the action as 'DESTRUCTIVE', warning the agent. However, it does not provide explicit when-not-to-use scenarios or list alternative tools.

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