Skip to main content
Glama
itunified-io

mcp-opnsense

by itunified-io

opnsense_vlan_delete

Delete a VLAN interface by UUID. Unassign it from a logical interface first to avoid failure.

Instructions

Delete a VLAN interface by UUID. Fails if the VLAN is still assigned to a logical interface — unassign it first via opnsense_if_assign.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uuidYesUUID of the VLAN to delete

Implementation Reference

  • The handler case for opnsense_vlan_delete: parses args with VlanDeleteSchema, calls DELETE API via client.post on /interfaces/vlan_settings/delItem/{uuid}, then triggers reconfigure.
    case "opnsense_vlan_delete": {
      const { uuid } = VlanDeleteSchema.parse(args);
      const result = await client.post(`/interfaces/vlan_settings/delItem/${uuid}`);
      await client.post("/interfaces/vlan_settings/reconfigure");
      return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
    }
  • VlanDeleteSchema: Zod schema validating that the input contains a 'uuid' field (UUID format).
    const VlanDeleteSchema = z.object({
      uuid: UuidSchema,
    });
  • Tool definition registration for 'opnsense_vlan_delete' with its name, description, and inputSchema (requiring uuid).
    {
      name: "opnsense_vlan_delete",
      description:
        "Delete a VLAN interface by UUID. Fails if the VLAN is still assigned to a logical interface — unassign it first via opnsense_if_assign.",
      inputSchema: {
        type: "object" as const,
        properties: {
          uuid: { type: "string", description: "UUID of the VLAN to delete" },
        },
        required: ["uuid"],
      },
    },
  • src/index.ts:68-68 (registration)
    Registration of handleVlanTool as the handler for all vlanToolDefinitions (including opnsense_vlan_delete) in the toolHandlers map.
    for (const def of vlanToolDefinitions) toolHandlers.set(def.name, handleVlanTool);
  • UuidSchema helper used by VlanDeleteSchema to validate the uuid input.
    export const UuidSchema = z
      .string()
      .uuid("Invalid UUID format");
Behavior4/5

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

With no annotations provided, the description carries the burden of behavioral disclosure. It reveals that the tool will fail if the VLAN is assigned, which is a key behavioral trait. However, it does not mention outcomes for non-existent UUIDs or any other side effects, but for a simple delete, the provided information 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?

The description is extremely concise: two sentences with no wasted words. The first sentence states the primary purpose, and the second adds a crucial precondition. It is front-loaded and efficient.

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 only has one parameter and no output schema or annotations, the description is fairly complete. It covers the action, the required UUID, the failure condition, and the prerequisite. However, it does not describe typical output or handling of invalid UUIDs, but for a delete operation, this is sufficient for correct agent usage.

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 schema description coverage is 100% with the parameter description 'UUID of the VLAN to delete'. The description adds no extra semantic meaning beyond what the schema already provides, so it meets the baseline of 3.

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 'Delete a VLAN interface by UUID', specifying the action (delete) and resource (VLAN interface). It distinguishes from sibling tools like opnsense_vlan_create, opnsense_vlan_list, and opnsense_vlan_update by focusing on deletion and mentioning a prerequisite.

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

Usage Guidelines5/5

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

The description explicitly states when not to use: 'Fails if the VLAN is still assigned to a logical interface — unassign it first via opnsense_if_assign.' This provides clear guidance on prerequisites and an alternative action, directing the agent to use opnsense_if_assign first.

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