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

Packet Tracer MCP — Node.js port

pt_apply_stp

Configures Spanning-Tree on a Packet Tracer switch, setting root-primary VLANs, priorities, PortFast, and BPDU Guard; use dry_run to validate generated CLI without deploying.

Instructions

Configures Spanning-Tree on a switch in the active topology.

Parameters:

  • switch: switch name in PT (e.g. "SW1").

  • mode: "rapid-pvst" (default) or "pvst".

  • root_primary_vlans: list of VLANs where this switch is root primary (generates spanning-tree vlan N root primary).

  • priority: dict {vlan_id: priority}. The priority must be 0-61440 and a multiple of 4096.

  • portfast_ports: access ports with spanning-tree portfast.

  • bpduguard_ports: ports with spanning-tree bpduguard enable.

  • dry_run: if True, only validates and returns the CLI/payload.

Example: SW1 root for VLAN 10 + portfast on Fa0/1: pt_apply_stp(switch="SW1", root_primary_vlans=[10], portfast_ports=["FastEthernet0/1"], dry_run=True)

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": {
      "switch": "<switch>"
    },
    "name": "pt_apply_stp"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNorapid-pvst
switchYes
dry_runNo
priorityNo
portfast_portsNo
bpduguard_portsNo
root_primary_vlansNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.11.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description must carry behavioral disclosure, and it does explain that dry_run 'only validates and returns the CLI/payload' — useful pre-execution context that the schema does not convey. However, it omits whether configuration is applied immediately or requires a separate deploy step, whether the operation is idempotent, what happens on invalid port names, and what a successful response contains.

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?

The purpose sentence is front-loaded and the parameter block is scannable, with a practical example at the end. The bullet per parameter occasionally restates the obvious (switch, dry_run), and the example partially duplicates the parameter list, but nothing is egregiously wasteful.

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

Completeness3/5

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

For a seven-parameter mutation tool with no annotations and no output schema, the description covers configuration semantics well but is thin on execution behavior: post-call state, deploy/persistence requirements, and failure modes are unaddressed. An agent could build a correct call but not fully predict the outcome.

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 has to compensate fully, and it does: all seven parameters are defined, including value constraints the schema cannot express (priority must be 0-61440 and a multiple of 4096), allowed mode values with a stated default, and the exact CLI each parameter generates. This is materially more than the bare titles in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence names a specific verb and resource ('Configures Spanning-Tree on a switch in the active topology'), which is far better than tautology. It doesn't explicitly distinguish itself from the sibling read tool pt_read_stp or from other pt_apply_* tools, so an agent must infer the read/write split from names alone.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the feature list (root primary, portfast, bpduguard) and reinforced by a concrete worked example, but there is no explicit 'use this when...' guidance, no exclusions, and no mention of when to prefer pt_read_stp or how this differs from other apply_* tools. Adequate but leaves routing to inference.

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