Skip to main content
Glama
itunified-io

mcp-opnsense

by itunified-io

opnsense_route_update

Modify an existing static route's destination, gateway, or disabled state. Use the route apply tool to activate updates.

Instructions

Update an existing static route. Run opnsense_route_apply afterwards to activate.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uuidYesUUID of the route to update
networkNoDestination network in CIDR notation
gatewayNoGateway name or UUID
disabledNoWhether the route is disabled
descriptionNoOptional description

Implementation Reference

  • Handler case for 'opnsense_route_update': parses args with UpdateRouteSchema, fetches existing route via GET /routes/routes/getroute/{uuid}, merges only provided fields, then POSTs to /routes/routes/setroute/{uuid}.
    case "opnsense_route_update": {
      const parsed = UpdateRouteSchema.parse(args);
      const existing = await client.get<{ route: Record<string, unknown> }>(
        `/routes/routes/getroute/${parsed.uuid}`,
      );
      const route = existing.route;
      const result = await client.post(`/routes/routes/setroute/${parsed.uuid}`, {
        route: {
          network: parsed.network ?? route["network"],
          gateway: parsed.gateway ?? route["gateway"],
          disabled:
            parsed.disabled !== undefined
              ? parsed.disabled
                ? "1"
                : "0"
              : route["disabled"],
          description: parsed.description ?? route["description"],
        },
      });
      return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
    }
  • UpdateRouteSchema: Zod object validating uuid (required UUID), optional network (CIDR), gateway (string), disabled (boolean), description (string).
    const UpdateRouteSchema = z.object({
      uuid: UuidSchema,
      network: NetworkSchema.optional(),
      gateway: z.string().min(1).optional(),
      disabled: z.boolean().optional(),
      description: z.string().optional(),
    });
  • Tool definition registration in routingToolDefinitions array with name 'opnsense_route_update', description, and inputSchema listing all parameters.
    {
      name: "opnsense_route_update",
      description:
        "Update an existing static route. Run opnsense_route_apply afterwards to activate.",
      inputSchema: {
        type: "object" as const,
        properties: {
          uuid: { type: "string", description: "UUID of the route to update" },
          network: { type: "string", description: "Destination network in CIDR notation" },
          gateway: { type: "string", description: "Gateway name or UUID" },
          disabled: { type: "boolean", description: "Whether the route is disabled" },
          description: { type: "string", description: "Optional description" },
        },
        required: ["uuid"],
      },
  • src/index.ts:67-67 (registration)
    Tool handler registration: maps 'opnsense_route_update' (via routingToolDefinitions) to handleRoutingTool in the main toolHandlers map.
    for (const def of routingToolDefinitions) toolHandlers.set(def.name, handleRoutingTool);
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It only states 'update' without explaining whether it is a partial update, if validation occurs, or what side effects exist (e.g., whether network or gateway changes disrupt traffic). The description does not reveal other behavioral traits.

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?

The description is extremely concise: two sentences, each serving a distinct purpose (stating the action and giving a procedural note). There is no wasted text, and the key information is front-loaded.

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?

Given the tool has 5 parameters, no output schema, and no annotations, the description is too brief to provide complete context. It does not explain what happens if required fields are omitted (uuid is required), how to find the uuid, or whether the update is immediate. The procedural note about applying is helpful but insufficient for a comprehensive understanding.

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?

The input schema has 100% description coverage, so each parameter's meaning is already clear from the schema. The description adds no extra meaning beyond stating the tool's action. Therefore, a baseline score of 3 is appropriate as the schema already does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Update' and resource 'existing static route', making it easy to understand the tool's core function. However, it does not explicitly differentiate from sibling tools like 'opnsense_route_add' or 'opnsense_route_delete', though the name itself provides some distinction.

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 includes an important procedural guideline: 'Run opnsense_route_apply afterwards to activate.' This tells the agent the post-update step. However, it lacks guidance on when to use this tool instead of alternatives, such as when to add a new route vs update, and no prerequisites (e.g., needing the UUID from a list).

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