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

Packet Tracer MCP — Node.js port

pt_apply_hardening

Applies CLI hardening to a router or switch: hostname, banner, secrets, local users, SSH, and SSH-only vty lines. Validate changes first with a dry run.

Instructions

Hardens a router/switch in the active topology.

Applies via CLI: hostname, MOTD banner, enable secret, local users, SSH (domain-name + RSA keys + ip ssh version), service password-encryption, and restricts the vty lines to SSH with local login.

Parameters:

  • device: device name in PT.

  • hostname: new hostname (optional).

  • banner_motd: MOTD banner text (without the '#' character).

  • enable_secret: enable password (it is encrypted).

  • users: list of {username, secret, privilege?}. Needed for SSH/local login.

  • ssh: dict {domain?, modulus?, version?, enable?} to enable SSH. Requires at least one user. modulus<768 raises a warning.

  • service_password_encryption: applies service password-encryption (default True).

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

Example: full hardening of R1 with SSH: pt_apply_hardening(device="R1", hostname="R1", enable_secret="cisco123", users=[{"username":"admin","secret":"adminpass","privilege":15}], ssh={"domain":"lab.local","modulus":1024}, 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": {
      "device": "<device>"
    },
    "name": "pt_apply_hardening"
  }
}

Input Schema

NameRequiredDescriptionDefault
sshNo
usersNo
deviceYes
dry_runNo
hostnameNo
banner_motdNo
enable_secretNo
service_password_encryptionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.11.0

TDQS

A4.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; it does add real behavioral detail, notably that enable_secret is encrypted, that SSH requires at least one user, that modulus<768 raises a warning, and that dry_run only validates. However, for a config-mutating tool it omits whether existing configuration is merged or overwritten, whether changes are written to startup config/persisted, and what happens on partial failure.

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-loaded one-line purpose, followed by the applied CLI list, a parameter reference, and a concrete end-to-end example. Each block is doing distinct work and the example ties several parameters together in a way the schema cannot.

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 CLI effects, parameter meanings, dependency rules, and a usage example, which is substantial for an annotation-free 8-parameter mutation tool with no output schema. The main missing piece is any statement about preconditions (device reachable/powered, privileged mode) and about what a successful return contains beyond the dry_run payload.

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%, so the description must supply all meaning and it largely does, documenting every one of the 8 parameters including the nested ssh sub-keys (domain, modulus, version, enable) and the users list shape. Minor gaps remain: the default privilege value, behavior of empty-string hostname/banner defaults, and the ssh.enable default are not stated.

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 ('Hardens') and resource ('a router/switch in the active topology') and then enumerates the exact CLI surface applied: hostname, MOTD, enable secret, local users, SSH, service password-encryption, vty SSH restriction. This clearly separates it from siblings such as pt_apply_acl, pt_apply_bgp, or pt_apply_stp, which each cover one narrower feature.

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?

The enumeration of covered CLI concerns effectively delimits scope, so an agent can tell this is the bulk security-baseline tool rather than a single-feature pt_apply_* sibling, and the dry_run note gives a safe validation path. It does not explicitly say when NOT to use it (e.g., when only SSH or only port security is needed), leaving that inference to the reader.

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