Manage Bridge VLAN
manage_bridge_vlanAdd, 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
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Action to perform | |
| bridge | Yes | Bridge interface name | |
| dryRun | No | Preview changes without applying. | |
| tagged | No | Interfaces 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 | |
| comment | No | Optional comment | |
| vlanIds | Yes | VLAN 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) | |
| disabled | No | Whether the entry is disabled (unchanged on update when omitted) | |
| routerId | No | Router ID; omit to use the default router. | |
| untagged | No | Interfaces that carry these VLANs untagged (access ports; set their PVID to match with manage_bridge_port). On update, replaces the list; [] clears it | |
| confirmationToken | No | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |