Skip to main content
Glama
itunified-io

mcp-opnsense

by itunified-io

opnsense_sys_backup_download

Download OPNsense configuration backup as XML. Retrieve current running config or a specific backup by ID.

Instructions

Download an OPNsense configuration backup as XML. Downloads the current running config if no backup_id is specified.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
backup_idNoSpecific backup ID to download (e.g. 'config-1773423430.7934.xml'). Omit to download the current running config.

Implementation Reference

  • Handler case for 'opnsense_sys_backup_download' that parses args with BackupDownloadSchema, builds the API path (with optional backup_id), calls client.getRaw() to download XML, and returns the result.
    case "opnsense_sys_backup_download": {
      const parsed = BackupDownloadSchema.parse(args);
      const backupPath = parsed.backup_id
        ? `/core/backup/download/this/${encodeURIComponent(parsed.backup_id)}`
        : "/core/backup/download/this";
      const xml = await client.getRaw(backupPath);
      return { content: [{ type: "text", text: xml }] };
    }
  • BackupDownloadSchema validates that backup_id is an optional string. If omitted, the current running config is downloaded.
    const BackupDownloadSchema = z.object({
      backup_id: z
        .string()
        .optional()
        .describe("Specific backup ID to download. If omitted, downloads the current running config."),
    });
  • Tool definition for 'opnsense_sys_backup_download' registered in systemToolDefinitions array with description and inputSchema showing backup_id as optional string.
    {
      name: "opnsense_sys_backup_download",
      description:
        "Download an OPNsense configuration backup as XML. Downloads the current running config if no backup_id is specified.",
      inputSchema: {
        type: "object" as const,
        properties: {
          backup_id: {
            type: "string",
            description:
              "Specific backup ID to download (e.g. 'config-1773423430.7934.xml'). Omit to download the current running config.",
          },
        },
      },
    },
  • src/index.ts:64-64 (registration)
    Registration of the handler function (handleSystemTool) for all system tool definitions, including opnsense_sys_backup_download, in the central toolHandlers map.
    for (const def of systemToolDefinitions) toolHandlers.set(def.name, handleSystemTool);
  • The getRaw() method used by the handler to fetch an XML response from the OPNsense API, used for downloading the backup as raw text.
    async getRaw(path: string): Promise<string> {
      try {
        const response = await this.http.get<string>(path, {
          responseType: "text",
          headers: { Accept: "application/xml" },
        });
        return response.data;
      } catch (error: unknown) {
        throw extractError(error, `GET ${path} (raw)`);
      }
    }
Behavior2/5

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

No annotations provided, so description bears full burden. Only states it downloads backup; does not disclose permissions required, error handling, or confirm read-only nature. Minimal behavioral context beyond the obvious.

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 short sentences, front-loaded with verb and resource. No unnecessary words; every sentence serves a purpose.

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 tool with one optional parameter and no output schema, description is fairly complete. Could explicitly mention return format (XML) but that's implied. Adequate for agent decision-making.

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 covers 100% of parameters with descriptions. The tool description adds value by clarifying that omitting backup_id downloads the current running config, which is not in the schema.

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?

Clearly states the tool downloads an OPNsense configuration backup as XML. Distinguishes from siblings like opnsense_sys_backup_list and opnsense_sys_backup_revert by specifying the download action.

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?

Provides some guidance: when to omit backup_id to download the current config. However, no explicit when-not or alternatives to other backup tools are given.

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