Skip to main content
Glama

pt_apply_vlan

Applies VLANs, access ports, trunks, and router-on-a-stick subinterfaces to a live Packet Tracer topology via IOS CLI, with optional dry-run validation before sending commands.

Instructions

Applies VLANs / trunks / inter-VLAN routing to the active PT topology through IOS CLI: switch side (VLANs, access ports, trunks) and optionally router side (.1q subinterfaces, router-on-a-stick). Use pt_query_topology for the real names/ports.

  • switch: switch name (e.g. "SW1"). router: only for subinterfaces.

  • vlans: [{"vlan_id": 10, "name": "SALES"}] (name optional).

  • access_ports: [{"switch": "SW1", "port": "FastEthernet0/1", "vlan_id": 10}].

  • trunks: [{"switch", "port", "allowed_vlans"?, "native_vlan"?, "encapsulation"?}]. A 2960 (dot1q only) gets no switchport trunk encapsulation; a 3560 does.

  • subinterfaces: [{"router": "R1", "parent_port": "GigabitEthernet0/0", "vlan_id": 10, "ip_cidr": "192.168.10.1/24"}].

  • dry_run: validate and return the CLI/payload without sending.

Router-on-a-stick example: resource pt://guide, "Tool notes".

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "pt_apply_vlan"
  }
}

Input Schema

NameRequiredDescriptionDefault
vlansNo
routerNo
switchNo
trunksNo
dry_runNo
access_portsNo
subinterfacesNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.12.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose meaningful behavior: it mutates the live topology via IOS CLI, dry_run "validate and return the CLI/payload without sending" gives a safe preview, and the device-model rule (a 2960 dot1q-only gets no `switchport trunk encapsulation`, a 3560 does) is non-obvious operational detail. It still omits whether existing VLAN/config is overwritten, whether an active PT session/privileged mode is required, and how partial failures are reported.

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?

Purpose is front-loaded in the first sentence, then a tight per-key bullet list with inline examples — very scannable and nearly waste-free. The trailing fragment "Router-on-a-stick example: resource pt://guide, 'Tool notes'." is a dangling pointer that adds little and slightly muddies the ending.

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?

Return values need not be explained because an output schema exists, and the description covers the multi-part input shapes well for a 7-parameter mutation tool with zero schema documentation. What is missing for full completeness is the live-session prerequisite, overwrite/idempotency semantics, and a minimum-viable-call statement, all of which matter for an unannotated write operation.

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 description coverage is 0% and every parameter is a bare, untyped object array, so the description is the only source of meaning — and it delivers concrete shapes and examples for vlans, access_ports, trunks, subinterfaces, switch, router, and dry_run, including optional keys like allowed_vlans/native_vlan/encapsulation and the note that vlan name is optional. The gap is that no parameter is required (0 required), yet the description never states that at least one of vlans/access_ports/trunks/subinterfaces must be supplied.

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 opens with a specific verb and resource set: "Applies VLANs / trunks / inter-VLAN routing to the active PT topology through IOS CLI," and enumerates the two sides (switch: VLANs, access ports, trunks; router: .1q subinterfaces/router-on-a-stick). It also distinguishes itself from the sibling pt_query_topology, which it delegates name/port discovery to, so an agent can tell what this tool configures versus what merely reads.

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?

It gives an explicit prerequisite and alternative: "Use pt_query_topology for the real names/ports," which is exactly the routing an agent needs before calling. It also clarifies the conditional scope of the router parameter ("only for subinterfaces") and the dry_run path, though it never states when not to use this tool (e.g., use pt_apply_stp or pt_apply_voice for other L2 features).

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