Skip to main content
Glama

v2_set_port_pvid

Idempotent

Set a switch port's PVID to route untagged traffic into the correct VLAN, so laptops or rescue consoles work without extra configuration.

Instructions

Set a switch port's PVID — the VLAN an UNTAGGED frame lands on. This is what decides where a laptop plugged straight into the port ends up, and it is what makes a rescue/console port actually work without configuring the laptop. The tagged VLAN list is preserved unless you replace it. Refuses inter-switch trunks unless force:true. [READ-ONLY MODE: returns the exact payload instead of sending it]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portYes
forceNo
dryRunNo
siteIdNo
portNameNoOptionally rename the port at the same time — useful when the existing label is wrong.
switchMacYes
pvidNetworkNameYesVLAN name or tag number, e.g. "MGMT" or "40".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.0.0

TDQS

A4.3/5.0
Behavior4/5

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

Adds genuinely useful behavior beyond the annotations: the tagged VLAN list is preserved unless replaced, trunks are refused without force:true, and read-only mode returns the payload instead of sending it. Annotations only declare idempotent/non-destructive; the description adds the trunk-refusal precondition and preservation semantics. Could go further on what happens to existing untagged membership.

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 the core definition and effect, then progressively adds edge cases (tagged preservation, trunk refusal, read-only mode). Efficient overall, though the parenthetical read-only banner is slightly jarring mid-definition.

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 mutation tool with no output schema and incomplete schema coverage, the description covers the important semantics: what changes, what's preserved, when it refuses, and the dry-run behavior. Missing coverage of the siteId/switchMac addressing params is the main gap.

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 low (29%), so the description must compensate, and it does for two key params: it defines pvidNetworkName as a VLAN name or tag ('MGMT' or '40' is in the schema too) and clarifies portName renames the port. It documents force's effect (allow trunks) in prose rather than repeating the boolean, and hints at dryRun via read-only mode. Still, port/siteId/switchMac are unexplained.

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?

States a specific verb (Set) and resource (switch port's PVID) and explains what PVID actually means ('the VLAN an UNTAGGED frame lands on'), which makes the effect on untagged traffic unambiguous. This distinguishes it from more general siblings like v2_set_port or v2_set_ports_bulk.

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?

Gives clear usage context via the concrete scenario of a laptop plugged into a port and the rescue/console port case, plus an explicit restriction: refuses inter-switch trunks unless force:true. It lacks explicit 'when to use this vs v2_set_port_profile / v2_set_ports_bulk' routing, so it falls short of 5.

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