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

Packet Tracer MCP — Node.js port

pt_apply_port_security

Configures port security on a switch access port by setting allowed MAC limits, violation mode, and sticky or static MAC addresses; use dry-run to validate CLI before deployment.

Instructions

Configures port-security on a switch's access port.

Parameters:

  • switch: switch name in PT.

  • port: access port (e.g. "FastEthernet0/1").

  • max_mac: maximum number of allowed MACs (default 1).

  • violation: "shutdown" (default) | "restrict" | "protect".

  • sticky: if True, learns sticky MACs (mac-address sticky).

  • static_macs: static MACs in IOS aaaa.bbbb.cccc format.

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

Example: max 2 sticky MACs on SW1's Fa0/1: pt_apply_port_security(switch="SW1", port="FastEthernet0/1", max_mac=2, 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>",
      "port": "<port>"
    },
    "name": "pt_apply_port_security"
  }
}

Input Schema

NameRequiredDescriptionDefault
portYes
stickyNo
switchYes
dry_runNo
max_macNo
violationNoshutdown
static_macsNo

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?

No annotations are supplied, so the description carries the full burden. It does add real value by explaining that dry_run 'only validates and returns the CLI/payload' and by naming the default violation mode 'shutdown', which signals a disruptive failure mode. However, it omits whether the configuration takes effect immediately or requires pt_deploy, whether the operation is idempotent, and what happens to pre-existing port-security settings.

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, followed by a compact parameter list and one concrete example — no filler. The parameter block largely restates names the schema already exposes, but given 0% schema coverage that repetition is justified rather than 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 7-parameter mutation tool with no annotations and no output schema, the description covers inputs well and explains dry_run. What remains missing is the deployment/lifecycle story (does the change apply live or need pt_deploy?) and error or rollback behavior, which an agent needs before invoking a port-disabling operation.

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 compensate entirely, and it does: every one of the 7 parameters is documented with meaning, accepted values, and defaults (max_mac default 1, violation enum shutdown/restrict/protect, sticky semantics, static_macs IOS 'aaaa.bbbb.cccc' format, dry_run behavior). This is meaningfully more than the bare schema titles provide.

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 description opens with a specific verb+resource+scope: 'Configures port-security on a switch's access port', which distinguishes it from generic siblings like pt_set_port and from other policy tools such as pt_apply_acl. It does not explicitly contrast itself with the closest alternative (pt_apply_hardening or pt_audit_security), so it stops short of a 5.

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 conveyed only implicitly: the worked example shows a dry-run-then-apply pattern, which hints at a validation workflow. There is no explicit when-to-use/when-not-to-use statement and no mention of prerequisites (e.g. that the port must be an access port already configured via pt_set_port).

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