Skip to main content
Glama

Manage Bridge VLAN

manage_bridge_vlan
DestructiveIdempotent

Add, update, or remove bridge VLAN table entries to assign tagged and untagged ports per VLAN, with idempotent validation and conflict checks.

Instructions

Add, update, or remove a bridge VLAN table entry (interface/bridge/vlan): which ports carry which VLANs tagged or untagged. Idempotent by bridge + vlanIds, compared as a set of ids (10,20 equals 20,10; 100-102 equals 100,101,102) with port lists compared order-insensitively: add returns already_exists when an equal entry exists and CONFLICT when it exists with different ports or overlaps another entry's VLANs; update returns no_change when nothing differs; update and remove return NOT_FOUND when no static entry has exactly those VLANs. Dynamic entries (created by RouterOS from PVIDs) are refused. A port listed as both tagged and untagged is rejected. Results warn when the bridge has vlan-filtering off (the entry has no effect until it is on) and when a change drops the bridge itself from a VLAN while filtering is on. Workflow: create the VLAN entries, set access-port PVIDs with manage_bridge_port, then enable vlan-filtering with manage_bridge last.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "action": "<action>",
      "bridge": "<bridge>",
      "vlanIds": "<vlanIds>"
    },
    "name": "manage_bridge_vlan"
  }
}

Input Schema

NameRequiredDescriptionDefault
actionYesAction to perform
bridgeYesBridge interface name
dryRunNoPreview changes without applying.
taggedNoInterfaces that carry these VLANs tagged (trunks). Include the bridge itself when the router has a VLAN interface on it. On update, replaces the list; [] clears it
commentNoOptional comment
vlanIdsYesVLAN id (1-4094), range (100-110) or comma list (10,20,100-110). With bridge, the idempotency key; order and format do not matter (20,10 equals 10,20)
disabledNoWhether the entry is disabled (unchanged on update when omitted)
routerIdNoRouter ID; omit to use the default router.
untaggedNoInterfaces that carry these VLANs untagged (access ports; set their PVID to match with manage_bridge_port). On update, replaces the list; [] clears it
confirmationTokenNoToken from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.18.0

TDQS

A4.6/5.0
Behavior5/5

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

Goes well past the annotations (destructiveHint/idempotentHint) by specifying the exact idempotency key and comparison semantics (set-of-ids, order-insensitive ports, 100-102 equals 100,101,102), the already_exists/CONFLICT/no_change/NOT_FOUND outcomes per action, and the refusal of dynamic entries. It also warns about two non-obvious operational effects: vlan-filtering being off and dropping the bridge from a VLAN while filtering is on.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose, then semantics, then failure modes, then workflow — a logical progression with no filler sentences. It is a dense single block, though, and the error-code clauses could be broken into a short list for faster scanning.

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

Completeness5/5

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

For a 10-parameter destructive mutation with no output schema, the description supplies what the schema cannot: result statuses, conflict conditions, validation rejections, and safety warnings. An agent has enough to decide when to call it, what to expect back, and how to sequence it with siblings.

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 coverage is 100%, so the baseline is 3, but the description adds genuine meaning beyond it: bridge + vlanIds as the idempotency key and the fact that id order/format is irrelevant. It also reinforces the tagged/untagged duality at a conceptual level, though it leaves dryRun and confirmationToken behavior to 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?

Opens with a specific verb set and resource ('Add, update, or remove a bridge VLAN table entry (interface/bridge/vlan)') and immediately clarifies the domain meaning: which ports carry which VLANs tagged or untagged. That distinguishes it from manage_bridge_port (port-level PVIDs) and manage_vlan (VLAN interface creation) without needing the schema.

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 final workflow sentence gives explicit ordering guidance relative to siblings: create VLAN entries, set access-port PVIDs with manage_bridge_port, then enable vlan-filtering with manage_bridge last. It also states the refusal conditions (dynamic entries, port both tagged and untagged), though it never points to a sibling for inspection (e.g. listing existing entries) before mutating.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools