Skip to main content
Glama
Packet Tracer MCP — Node.js port

Packet Tracer MCP — Node.js port

pt_apply_vlan

Apply VLANs, access ports, trunks, and inter-VLAN subinterfaces to an active Packet Tracer topology via IOS CLI, with dry-run validation before deployment.

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.11.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and discloses CLI application, dry-run validation, and device-specific trunk encapsulation behavior for 2960 vs 3560. It does not state permission requirements, idempotency, or whether existing configuration is overwritten.

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?

Front-loads the purpose, then uses a compact bullet list for parameters. The examples and the 2960/3560 encapsulation note are high-value and no sentences appear redundant.

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?

Covers the operation, all inputs, discovery prerequisite, and dry-run behavior. For a seven-parameter mutation tool with no output schema, it could add return or error behavior, but it is sufficient for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must define all seven parameters, and it does: switch, router, vlans, access_ports, trunks, subinterfaces, and dry_run with examples and optional field notes. This fully compensates for the absent schema descriptions.

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 (applies) and resource (VLANs/trunks/inter-VLAN routing) on the active PT topology via IOS CLI. It clearly distinguishes switch-side and router-side operations and names pt_query_topology for discovering real names and ports.

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?

Explicitly tells the agent to use pt_query_topology for real names/ports and clarifies that router is only for subinterfaces. It does not provide when-not-to-use guidance or compare against other apply tools, but the practical usage context is clear.

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