Packet Tracer MCP — Node.js port
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PT_MCP_UI_MODE | No | Device-panel presentation mode. Valid values are 'headless' or 'ui'. A saved mode file next to the token file takes precedence over this variable. | headless |
| PT_MCP_WORKDIR | No | Working directory where exports, screenshots, and saved plans are stored. | ~/PacketTracerMCP |
| PT_MCP_BRIDGE_HOST | No | Bind address for the Packet Tracer bridge. The configured host:port is automatically added to the bridge's Host allowlist. When unset, behavior is identical to upstream and binds to loopback only. | 127.0.0.1 |
| PT_MCP_BRIDGE_TOKEN | No | Shared secret between the MCP server and the Packet Tracer extension. Must be at least 32 characters from [A-Za-z0-9_-]; an unusable value is a hard startup error. When unset, a random token is generated once and persisted to a token file. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Cisco Packet Tracer automation through PTBuilder. Full guide (every rule, API fact and recipe): read the resource pt://guide, or load the packet-tracer skill, before non-trivial work.
MANDATORY before planning: pt_list_devices (real models and exact ports), pt_get_device_details for unknown ports, pt_list_modules before installing modules. NEVER invent model, port, cable or module names.
Flow. New topology: pt_list_devices → pt_plan_topology → pt_validate_plan → pt_live_deploy, or pt_full_build in one step. Existing topology: pt_bridge_status → pt_query_topology → edit tools.
Rules that fail silently:
Module
slotis a STRING ("0/0", "1"), never an int. 2911/2901/1941 take HWIC only (1941: "0/0", "0/1"); ISR4321/4331 take NIM only. Several modules → pt_install_modules_batch.Cable types: "straight", "cross", "serial", "fiber", "console", "roll", "phone", "coaxial", "auto", "usb". Never "crossover": use "cross". Prefer pt_add_link (it validates).
Ports: 2911 GigabitEthernet0/0-0/2; 2960 FastEthernet0/1-24 + GigabitEthernet0/1; hosts FastEthernet0.
Router DHCP is CLI (dhcp=True in plans); Server-PT DHCP is pt_configure_dhcp_server / pt_server_dhcp.
Config tools accept dry_run=True. Only
verified: truemeans IOS took every line; readrejected_lines, then read back (pt_read_routes/ospf/vlans/acl/nat/qos/dhcp_leases).Diagnose with pt_health_check, pt_inspect_ports, the pt_read_* tools and pt_send_pdu(steps=N) (the trace says why), not by parsing
show. pt_fast_forward after cabling.Canvas: pt_canvas_info gives the visible x/y range; plans are already laid out by topology; pt_auto_layout rearranges a canvas built by hand.
Device windows (CLI, Command Prompt, Desktop apps, Services): pt_cli, pt_host_command, pt_server_* and friends work headless; pt_ui_mode("ui") or show=True opens PT's window, capture=True saves a PNG.
Tool output is in English; answer the user in their own language.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
| prompts | {} |
| resources | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| pt_list_devicesA | Lists every device available in Packet Tracer with its ports. Use this to know which models, ports and cables you can use. |
| pt_list_templatesA | Lists every available topology template with its description. |
| pt_get_device_detailsB | Shows the details of a specific device model. Accepts either the exact model name (e.g. '2911', '2960-24TT') or a catalog alias (e.g. 'router', 'switch', 'firewall'). Parameters:
|
| pt_estimate_planA | Quick estimate (dry-run) without generating a full plan. Shows how many devices, links and subnets will be created. Parameters:
|
| pt_plan_topologyB | Generates a complete network topology plan for Packet Tracer. Parameters:
Returns the full plan JSON. |
| pt_validate_planA | Validates a topology plan. Returns typed errors and warnings. Parameters:
|
| pt_fix_planB | Tries to fix the plan's errors automatically. Fixes cables, upgrades routers that lack ports, reassigns ports. Parameters:
|
| pt_explain_planB | Explains the plan's decisions in natural language. Useful to understand why certain models, IPs, etc. were chosen. Parameters:
|
| pt_generate_scriptC | Generates the PTBuilder JavaScript script. Parameters:
|
| pt_generate_configsC | Generates the CLI (IOS) configurations for every router and switch. Parameters:
|
| pt_exportB | Exports the plan to files: JS script, CLI configs and JSON. Parameters:
|
| pt_deployA | Deploys a plan to Packet Tracer: copies the script to the Windows clipboard, exports the configuration files, and generates step-by-step instructions. Usage: after pt_full_build or pt_plan_topology, pass the plan JSON here to prepare everything for Packet Tracer. Parameters:
|
| pt_list_projectsC | Lists the saved projects. Parameters:
|
| pt_load_projectC | Loads a saved project. Parameters:
|
| pt_full_buildA | Full pipeline: plans, validates, generates, explains, estimates and deploys. deploy=True (default): with a channel to PT the topology is REALLY created (same path as pt_live_deploy, with verification and reconcile) and project files are exported; with no channel it falls back to manual mode (script to clipboard + step-by-step instructions). Parameters:
|
| pt_live_deployA | Sends commands directly to Packet Tracer in real time. Requires PT open with the MCP Control Center extension installed. With the window open HTTP is used; if you close it, the file channel (Script Engine) takes over. The bridge starts by itself inside the MCP server. Parameters:
|
| pt_bridge_statusA | Checks which channel Packet Tracer is connected through. There are two: HTTP (when the MCP Control Center window is open) and file (when it is closed but PT is still open with the extension). With either one, deployment works. |
| pt_verify_connectivityA | Runs a REAL ping from a device in PT and returns the result. Unlike validations that are only printed as "check it by
hand", this runs Works with hosts (PC/Server/Laptop, format "Packets: Sent=..") and with IOS devices (router/switch, format "Success rate is N percent"). Parameters:
|
| pt_save_projectA | Saves Packet Tracer's active topology as a .pkt file. Closes the loop: until now the MCP built the topology but saving it needed Ctrl+S by hand. Parameters:
|
| pt_open_projectA | Opens a .pkt file in Packet Tracer. WARNING: it replaces the topology currently open. If it has unsaved changes, save them first with pt_save_project. Parameters:
|
| pt_query_topologyA | Query current devices in Packet Tracer. Returns name, model, and port/IP info for each device in the active topology, then every link with its real cable type (read from the link itself). Requires bridge connected (use pt_bridge_status to verify). |
| pt_export_topologyA | Export a detailed snapshot of the full topology currently in Packet Tracer. Returns devices (name, model, x/y position, interfaces with IPs) and links (endpoints, ports, and the REAL cable type PT reports for each link: straight, cross, serial, fiber...). This gives a complete picture of what is deployed so the LLM can reason about the topology. |
| pt_delete_deviceA | Delete a device from the active topology in Packet Tracer. Uses getLogicalWorkspace().removeDevice() and verifies the device is gone. Parameters:
|
| pt_rename_deviceA | Rename a device in the active Packet Tracer topology.
Reads the result back: Parameters:
|
| pt_move_deviceA | Move a device to new coordinates on the Packet Tracer canvas.
Reads the position back: Parameters:
|
| pt_delete_linkA | Delete the link connected to a specific interface on a device in PT.
Reads both ends back: Parameters:
|
| pt_add_deviceA | Add a single device to Packet Tracer with validation. Checks: name not empty, model exists in catalog, no duplicate name. Parameters:
|
| pt_add_linkA | Create a link between two devices in Packet Tracer with full validation. Checks: both devices exist, both ports exist, ports are free, cable type is valid. If cable_type is omitted, it is inferred from the device categories. Parameters:
|
| pt_set_portA | Sets low-level attributes of a port on a live device in PT. Only applies the attributes passed explicitly (parameters with
sentinel defaults). Useful for adjustments the CLI doesn't expose easily, or
that you want to apply without entering Parameters:
Returns which attributes were applied (those with a method available in
the port's API). If some |
| pt_send_rawA | Send arbitrary JavaScript to Packet Tracer via bridge. Useful for exploring the IPC API or running custom commands. If wait_result=True, reportResult() is auto-injected into scope. Just call reportResult(data) in your code — no need to define it. Examples: pt_send_raw("reportResult(getDevices('router'))", wait_result=True) pt_send_raw("addDevice('TestR','2911',500,300)") Parameters:
|
| pt_list_modulesA | Lists the expansion modules available in the PT catalog. Without filters it returns ALL modules. Useful to find the exact names before calling pt_add_module. Parameters:
Returns JSON with: name, description, category, ports_added, compatible_with. |
| pt_add_moduleA | Installs an expansion module on a device in the active topology. PT powers the device off, installs the module and powers it back on (with skipBoot). A restart reloads the startup-config, so routers/switches are saved first (write memory); the reply says whether the device restarted and was saved. Parameters:
Example: add 2 serial ports to R1 in HWIC slot 0: pt_add_module(device_name="R1", slot="0/0", module_name="HWIC-2T") |
| pt_install_modules_batchA | Installs N modules in a single runCode JS — save → power-off → addModule×N → power-on. Useful when several serial modules (HWIC-2T, NIM-2T, etc.) have to go into several routers at once. PREFER this tool over multiple calls to pt_add_module: each individual power cycle can pause PT's script engine for > 5s and kill the bridge bootstrap's polling. Parameters:
Slot rules (string): HWIC on 2911/2901 → "0/0".."0/3" · on 1941 ONLY "0/0" and "0/1" NIM on ISR4321/4331 → "0/1", "0/2" (chassis/subslot — NOT "0"/"1") NM on 2811/Router-PT → "1" Cloud-PT / hosts → "0".."7" Returns JSON with summary and per-module status (installed or not). The JS (js_payload) is only included with dry_run; once sent it is dropped. |
| pt_apply_aclA | Applies an ACL to a router in PT's active topology: validates (ranges, types, IPs/wildcards, unreachable rules), checks router/interface against PT, generates IOS CLI and sends it through configureIosDevice.
Example entry: {"action": "deny", "protocol": "icmp", "source": "192.168.1.0 0.0.0.255", "destination": "192.168.0.0 0.0.0.255", "icmp_type": "echo"}. Full example: resource pt://guide, "Tool notes". |
| pt_apply_acl_objectA | Applies an ACL using PT's object API (AclProcess.addAcl/addStatement) instead of CLI through configureIosDevice. Same input as pt_apply_acl. It is faster (no CLI parsing) and less prone to raising modal popups that break the bridge if a line goes wrong. Limitation: binding only works on the catalog's physical ports (e.g. GigabitEthernet0/0). For sub-interfaces (G0/0/1.20) use pt_apply_acl (CLI), since port.setAclInID only applies to the base port and not the sub-interface. Pipeline: validate the plan → generate statements (without the "access-list NAME " prefix) → run addAcl + addStatement one by one + optional binding. |
| pt_remove_acl_objectA | Removes an ACL using the object API (AclProcess.removeAcl + Port.setAclInID=""). Alternative to pt_remove_acl (CLI). If binding_interface is given, it first clears the port's AclInID/AclOutID and then removes the ACL. Parameters:
|
| pt_remove_aclA | Removes an ACL applied on a router. If binding_interface is given, it first removes the binding from the interface (no ip access-group ...) and then deletes the whole ACL (no access-list ...). Parameters:
|
| pt_apply_natA | Applies NAT or PAT to a router in PT's active topology (IOS CLI through the bridge).
Typical PAT: mode="pat", inside_networks=["192.168.1.0 0.0.0.255"], use_interface_overload=True. Mode guidance and a full example: resource pt://guide, "Tool notes". |
| pt_remove_natA | Removes the NAT/PAT configuration from a router. Removes the ip nat inside/outside marks from the interfaces and deletes the associated translations, pool and access-list. Parameters:
|
| pt_apply_vlanA | 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.
Router-on-a-stick example: resource pt://guide, "Tool notes". |
| pt_apply_stpA | Configures Spanning-Tree on a switch in the active topology. Parameters:
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) |
| pt_apply_port_securityA | Configures port-security on a switch's access port. Parameters:
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) |
| pt_apply_hardeningA | Hardens a router/switch in the active topology. Applies via CLI: hostname, MOTD banner, enable secret, local users, SSH
(domain-name + RSA keys + Parameters:
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) |
| pt_apply_interface_tuningA | Tunes the parameters of a router interface in the active topology. Parameters (all optional except router/interface):
Example: authenticate OSPF with MD5 between R1 and its neighbour: pt_apply_interface_tuning(router="R1", interface="GigabitEthernet0/0", ospf_md5_key_id=1, ospf_md5_key="s3cr3t") |
| pt_apply_etherchannelA | Bundles switch ports into an EtherChannel (Port-channel) through IOS CLI, each line verified. Measured on a 2960-24TT in PT 9; other models are not verified.
Check it with pt_cli(device=switch, commands=["show etherchannel summary"]). Example: pt_apply_etherchannel(switch="SW1", ports=["FastEthernet0/10", "FastEthernet0/11"], group=1, mode="active", trunk=True) |
| pt_read_vlansA | Reads a switch's REAL VLAN database in PT. Returns each VLAN with its number, name, whether it is one of PT's factory ones (1, 1002-1005) and its access ports; plus the trunk ports (with native VLAN), the ports with port security, and access ports left in a VLAN missing from the database. Use it to confirm that a pt_apply_vlan was applied, or to discover a topology you didn't build. Parameters:
Example: pt_read_vlans(switch="SW1") |
| pt_apply_hsrpA | Configures one HSRP group on a router interface through IOS CLI, each line verified
(
Example (active router; repeat on R2 with priority=100): pt_apply_hsrp(router="R1", interface="GigabitEthernet0/0", group=1, virtual_ip="192.168.1.254", priority=110) Check: pt_cli(device="R1", commands=["show standby brief"]). |
| pt_apply_bgpA | Configures BGP on a router through IOS CLI, each line verified (
Example: pt_apply_bgp(router="R1", asn=65001, neighbors=[{"ip": "10.0.0.2", "remote_as": 65002}], networks=["192.168.1.0/24"]) Check: pt_cli(device="R1", commands=["show ip bgp summary"]). |
| pt_apply_qosA | Configures QoS (MQC) on a router through IOS CLI, each line verified: one
Example: pt_apply_qos(router="R1", interface="GigabitEthernet0/1", policy_name="WAN-OUT", classes=[{"name": "VOICE", "match_protocol": "rtp", "match_dscp": "ef", "priority_kbps": 512}]) Check: pt_read_qos(device="R1"). |
| pt_apply_voiceA | Cisco CME voice (IP phones) through IOS CLI, each line verified. The router MUST be
a 2811 (PT's 2911 rejects
Example: pt_apply_voice(router="R1", source_ip="10.10.10.1", extensions=["1001","1002"], dhcp_pool="VOICE", dhcp_network="10.10.10.0/24") Check: pt_cli(device="R1", commands=["show ephone"]). |
| pt_audit_securityA | Audits the REAL security posture of the live devices in PT. It does not read the plan: it reads the effective configuration of each router/switch
on the canvas and reports findings with a severity (high/medium/low). Detects
a missing Passwords and hashes NEVER leave the device: only the label of the algorithm they are stored with is transmitted. Hosts (PC/Server/Laptop) are skipped: they have no IOS configuration. Parameters:
Example: audit the whole topology: pt_audit_security() |
| pt_diffA | Compares a plan (JSON from pt_plan_topology) against PT's LIVE topology. Reports: plan devices missing from PT, extra devices in PT, and per-interface IP mismatches. Useful to reconcile after a deploy. Requires a connected bridge. |
| pt_health_checkA | Health sweep of PT's LIVE topology. Reports: down links (cabled but not up), cabled ports without an IP (possibly an unfinished DHCP), and duplicate IPs. Requires a connected bridge. |
| pt_inspect_portsA | Real state of each port of a live device in PT. Reads the device, not the plan: line/protocol status, MAC, IP/mask, duplex, bandwidth, MTU, delay, CDP, DHCP client, NAT mode, applied ACLs and, on a cabled port, the real cable type (straight, cross, serial...) and the far end ("SW1:FastEthernet0/1"). Flags anomalies (cable connected with the port down, line up with protocol down). It is the DETAIL view of one device; for the sweep of the whole topology (down links, duplicate IPs) use pt_health_check. Parameters:
Example: see why one of R1's links won't come up: pt_inspect_ports(device="R1", only_linked=True) |
| pt_device_powerA | Powers a device in PT on or off, with a verification read. Useful to simulate equipment failure and see how routing reacts, or to restart a router so it rereads its startup-config. Works on every model, PCs included. Hosts have no IOS boot,
so when powering them on Parameters:
Example: simulate R2 going down: pt_device_power(device="R2", on=False) |
| pt_read_routesA | Reads the REAL routing table of a live device (or of every router). What Parameters:
Example: did OSPF converge? pt_read_routes() |
| pt_read_ospfA | Reads OSPF's REAL state: router-id, areas and neighbours per process. Each neighbour comes with its state by name (FULL, 2WAY, INIT...), its role (DR/BDR/DROTHER, null on point-to-point), local port and address. Flags neighbours not FULL (2WAY between DROTHERs is normal), duplicate router-ids and routers with OSPF but no neighbours. Parameters:
Example: pt_read_ospf(device="R1") |
| pt_read_arpA | Reads the REAL ARP table (IP -> MAC -> port) of a device, router or host. Parameters:
Example: did PC1 resolve its gateway? pt_read_arp(device="PC1") |
| pt_read_cdpA | Reads the REAL CDP neighbour table: who is cabled to which port. Per neighbour: device id, local and remote port, platform, capability. CDP announces every 60 s: right after a deploy the table is empty. Parameters:
Example: pt_read_cdp(device="SW1") |
| pt_read_stpA | Reads Spanning Tree's REAL state per VLAN: who the root bridge is. Per switch and VLAN: whether it is the root, the root ID (priority and MAC), and where available its bridge ID, priority, root path cost and root port. Across switches it flags VLANs where they disagree on the root (not converged). PT 9 does not expose per-port STP state or role. Parameters:
Example: pt_read_stp(vlans=[1, 10]) |
| pt_read_aclA | Reads the REAL ACLs of a router: each ACL with its commands, and which ports have an ACL applied in which direction. Flags ports that reference an ACL that does not exist. Use it to check a pt_apply_acl. Parameters:
Example: pt_read_acl(device="R1") |
| pt_read_natA | Reads a router's REAL NAT state: the translation table, NAT counters (inside source lists, statics, pools) and inside/outside interfaces. Flags a router with NAT but without both an inside and an outside interface. Use it to check a pt_apply_nat. Parameters:
Example: pt_read_nat(device="R1") |
| pt_read_mac_tableA | Reads a switch's REAL MAC address table, per VLAN: MAC, port, dynamic or static. Parameters:
Example: where did SW1 learn PC1's MAC? pt_read_mac_table(switch="SW1") |
| pt_read_dhcp_leasesA | Reads the REAL DHCP leases a server handed out: per pool, each lease's IP, MAC, port and lease time. Router pools ( Parameters:
Example: pt_read_dhcp_leases(device="R1") |
| pt_simulation_modeA | Switches PT between Realtime and Simulation mode. In Simulation mode packets do NOT move on their own: they stay queued in the event list and have to be moved with pt_simulation_step. That is what allows reading the path packet by packet with pt_read_packet_trace. Parameters:
Example: pt_simulation_mode(on=True) |
| pt_simulation_stepA | Steps the simulation forward, back, or resets it. Requires Simulation mode (pt_simulation_mode(on=True)). Each step moves the packets one event; after stepping, read the result with pt_read_packet_trace. Parameters:
Example: step 5 events forward: pt_simulation_step(action="forward", times=5) |
| pt_read_packet_traceA | Reads the simulation's event list: what each packet did and WHY. Besides the path (device, ingress/egress port, source, destination, traffic type and outcome) it returns the decision log that PT generates per OSI layer — the same text as the "PDU Details" panel of its GUI. That is where the real cause of a failing ping shows up, for example: "The next-hop IP address is not in the ARP table." Requires Simulation mode with generated traffic (pt_simulation_mode(on=True) and then a ping, or pt_simulation_step so the events move on). Parameters:
Example: see why a ping is dropped: pt_read_packet_trace(limit=10) |
| pt_screenshotA | Captures PT's logical canvas and saves it as an image. Returns the file's PATH, not the image: a capture weighs tens of thousands of bytes and dumping it in the reply would fill the context without anyone being able to see it. PNG compresses a diagram much better than JPG (measured: 33 KB versus 105 KB for the same canvas), so it is the default. Parameters:
Example: pt_screenshot(filename="lab-ospf") |
| pt_add_noteA | Writes a text note on PT's canvas. Use it to document the topology on the diagram itself: label a subnet, mark an OSPF area, name a trunk link. Returns the note's id, which can be used to delete it later. The coordinates are the same logical-canvas ones that pt_add_device and pt_move_device use: routers ~y=100, switches ~y=250, hosts ~y=400. The font size is NOT configurable: PT fixes it and uses that parameter for the stacking order, which the tool computes by itself. Parameters:
Example: pt_add_note(x=300, y=100, text="LAN 192.168.0.0/24") |
| pt_clear_annotationsA | Removes the canvas annotations: text notes and drawings. It does NOT touch devices or links, only the graphic elements. PT leaves orphan note ids that it never releases — with no text and that it
refuses to delete. They are not a failure: the canvas is visually clean
anyway, and they are reported separately as Parameters:
Example: pt_clear_annotations() |
| pt_canvas_infoA | Size of PT's visible logical view and where the devices are, so you know which x/y range to use before pt_add_device / pt_move_device / pt_add_note. Returns view [width, height] in canvas px (depends on the screen and the window: 1512x599 on a 14" MacBook, about 1900x700 on a maximised 1920x1080), zoom (0 = 100 %), the device count and their bbox [x0, y0, x1, y1]. x/y of a device is the top-left corner of its icon (about 50x40 px, labels below): keep x within [40, width-90] and y within [40, height-90] so everything is visible. |
| pt_auto_layoutA | Rearrange the devices on the canvas by topology and fit them to the visible view. Reads the live devices and links: routers form the core (2 or a chain: a row with the end LANs pointing outward, middle LANs alternating down/up; a ring: a polygon; a hub: a star), each LAN hangs off its router away from the core (switch, then its hosts side by side), a WAN cloud takes the free side. Moves everything in one call and reads each position back. Use it after building by hand, after adding devices, or when a lab looks crowded. pt_full_build / pt_plan_topology already plan with this layout. Parameters:
|
| pt_backup_configA | Backs up a PT device's startup configuration. Returns the real startup-config (the one the device rereads on restart), plus its serial number, config-register, boot images and uptime. Use it to save a known state before touching something, or to compare two devices. Parameters:
Example: pt_backup_config(device="R1") |
| pt_project_metadataA | Reads (and optionally writes) the metadata of the project open in PT. Returns the saved file, the PT version that wrote it and the project description, together with the device and link counts. Useful to know what you are working with before changing anything. Parameters:
Example: pt_project_metadata() |
| pt_workspace_optionsA | Reads and adjusts PT workspace options that affect how it behaves. Without arguments it is read-only. The flags are tri-state: 1 enables, 0 disables, -1 (default) leaves alone. Parameters:
Example: turn auto-cabling off before a scripted deploy: pt_workspace_options(auto_cabling=0) |
| pt_apply_netflowA | Configures a NetFlow exporter on a PT device. Unlike the rest of the advanced features, NetFlow does NOT go through CLI: it is configured directly and read back to verify it was applied. If the name already exists, it is reconfigured instead of duplicated. The exported FLOWS are not read: no way to read them was measured on PT 9 (the exporter manager has no exporter or monitor count either). Parameters:
Example: export to a collector at 192.168.0.50: pt_apply_netflow(device="R1", name="COLLECTOR-1", destination_ip="192.168.0.50") |
| pt_configure_dhcp_serverA | Creates or edits a DHCP pool on a Server-PT (GUI: Services > DHCP), validated against
its subnet, switches the service on and reads every pool back. No CLI (a Server-PT has none).
Router DHCP: plan with dhcp=True or CLI The server needs a static IP inside the pool's subnet (else warning DHCP_SERVER_NO_IP). PT never leases the server's own IP but DOES lease the gateway's if the range covers it.
Example: pt_configure_dhcp_server(device="DHCP-A", network="192.168.10.0", gateway="192.168.10.1", dns="8.8.8.8", start_ip="192.168.10.3") |
| pt_read_qosA | Reads a device's REAL QoS configuration: class-maps and policy-maps. Read only (PT's API cannot create class/policy-maps): to CONFIGURE QoS use pt_apply_qos. This tool checks that it was applied. Returns, per class-map, its match type and CLI; per policy-map, its classes in order, each with its name, priority (kbps), bandwidth (kbps), fair-queue and whether it is class-default. PT does not give a class its name, so names come from the running-config, matched by position. Parameters:
Example: pt_read_qos(device="R1") |
| pt_send_pduA | The GUI's "Add Simple PDU": an ICMP echo from one device to another. Parameters:
The first PDU between two devices can die at a router waiting on ARP, exactly like the first ping: send it again. Example: pt_send_pdu("PC1", "PC4", steps=10) |
| pt_fast_forwardA | Realtime's "Fast Forward Time" button: moves PT's clock ahead at once. Use it after cabling or changing switch links: STP needs ~30 s to put a new port in forwarding, and fast-forwarding gets there immediately, so a ping right after it works (measured on PT 9.0). Realtime only (in Simulation use pt_simulation_step). The network is not reset. pt_live_deploy and pt_verify_connectivity already do this themselves. |
| pt_wireless_apA | An access point's wireless settings (AccessPoint-PT Config > Port 1), applied and read back. With no settings it only reads. Parameters (empty/None = leave alone):
A dropped client's port still reads up/linked: confirm with a ping (pt_host_command) or its address, not the port state. WPA/WEP are not settable: clients need a matching profile, and PT's client profile API is broken. |
| pt_ui_modeA | Headless vs UI: decides whether the device-panel tools also SHOW what they do in Packet Tracer's window.
The mode is saved and survives server restarts. Every tool also accepts show=True/False for a single call. Use it when the user says "show it in PT", "I want screenshots", "use the tabs" (→ "ui") or "do it in the background" (→ "headless"). |
| pt_cliA | Types commands into a router/switch console (CLI tab) and returns each one's output. Same as typing in the IOS CLI: enable, configure terminal, interface..., show ip route, ping, copy run start... Without taking the screen: it goes through PT's API, and what is typed shows up in the device's real CLI tab. Parameters:
Each command comes back marked: ok, ERROR (% Invalid input...), UNKNOWN COMMAND (IOS took it as a hostname: the DNS lookup is aborted), WAITING FOR ANSWER or TIMEOUT. A freshly created router is primed automatically (answers 'no' to the initial dialog). |
| pt_host_commandA | Runs a command in a PC/Laptop/Server's Desktop > Command Prompt (ping, ipconfig, ipconfig /all, ipconfig /renew, tracert, arp -a, nslookup, netstat, telnet, ssh -l user ip, ftp...) and returns the output. Parameters:
|
| pt_ui_openA | Opens a device's window in PT on a tab/app/section, without moving the mouse or typing (UI Automation + PT's API).
Works in headless mode too: it is an explicit request to show. Requires Windows and the [ui] extra (comtypes). |
| pt_ui_closeA | Closes a device's window in PT, or all of them if device is empty. |
| pt_ui_captureA | Saves a PNG of a device's window as it looks in PT (or of the main window if device is empty). Works even when the window is covered. Returns the file's PATH, not the image. Open the tab/app you want first with pt_ui_open (or show=True on the tool you ran). For the logical canvas without the interface there is pt_screenshot. |
| pt_host_ip_configA | Desktop > IP Configuration (and Config > Global) of a PC/Laptop/Server: static IP or DHCP, mask, gateway, DNS, IPv6 (automatic or static). Parameters (empty = leave alone):
For routers/switches use pt_cli (ip address ... on the interface). |
| pt_read_device_panelB | Reads what a device's tabs show, in one go (read-only): model, power, whether it is a host, DHCP, the host's default gateway, per port IP/mask/MAC/state/IPv6/firewall/ bandwidth, and on servers which services (DHCP, DNS, HTTP, TFTP, FTP, SYSLOG, EMAIL, NTP) are on. |
| pt_remove_moduleA | Removes the module installed in a slot (Physical tab). Powers the device off, removes it and powers it back on, like pt_add_module (routers/switches are saved first with write memory); skipped when PT reports the module as hot-swappable. The reply says whether it restarted and was saved.
|
| pt_web_browserA | A host's Desktop > Web Browser: opens a URL (http://IP, http://name with DNS, https://...) and returns the text of the page it received. If the browser still shows its previous page (failed or slow load), the reply is ok=false with a warning, not that old page; re-opening the URL it last loaded returns the page again. timeout: up to 120 s. In UI mode (or show=True) the window's own browser does the navigation, so the capture shows the rendered page. |
| pt_server_dhcpA | A Server-PT's Services > DHCP: creates or edits a pool and switches it on.
|
| pt_server_dnsA | A Server-PT's Services > DNS: adds/removes records and switches the service on.
|
| pt_server_httpA | A Server-PT's Services > HTTP: switches HTTP/HTTPS and edits pages.
|
| pt_server_serviceA | A Server-PT's Services > TFTP / FTP / SYSLOG / EMAIL.
|
| pt_email_clientA | A host's Desktop > Email.
|
| pt_host_firewallB | A host's Desktop > Firewall / IPv6 Firewall: switches the inbound firewall on or off (True/False; None = leave alone). Individual rules have no API in PT; edit them in the window (pt_ui_open(host, app="firewall")). |
| pt_terminalA | Desktop > Terminal of a PC connected by a CONSOLE cable (RS 232) to a router/switch: types on that device's console, as from the PC's Terminal. This is how labs configure a device "over the console".
|
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| ui_on | Packet Tracer: show device actions in PT's real windows (CLI tab, Desktop apps) for screenshots |
| ui_off | Packet Tracer: work headless again (API only, no windows opened) |
| ui_status | Packet Tracer: report whether device actions run headless or in PT's windows |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| resource_device_catalog | Full catalog of devices available in Packet Tracer. |
| resource_cable_catalog | Cable types available in Packet Tracer. |
| resource_aliases | Common aliases for device models. |
| resource_templates | Available topology templates with descriptions. |
| resource_guide | Full usage guide: every rule, verified PT API fact and recipe (the short server instructions point here). |
| resource_capabilities | Server capabilities and version. DERIVED from the live tool registry: instead of keeping a hand-maintained list that can drift (it used to say nat="unsupported" while pt_apply_nat existed), it introspects the tools that are actually registered and reports the support of each feature based on whether its tool exists. If introspection fails for any reason, it falls back to the static CAPABILITIES values. |
TDQS
Scored across 98 tools
Most feature areas (VLANs, STP, ACLs, NAT, QoS, voice, etc.) are clearly distinct and the descriptions often cross-reference each other (e.g. pt_inspect_ports vs pt_health_check). However, the plan/deploy pipeline has heavy overlap (pt_plan_topology, pt_full_build, pt_live_deploy, pt_deploy, pt_export) and the topology-read tools (pt_query_topology, pt_export_topology, pt_read_device_panel, pt_inspect_ports) are easy to confuse. With 98 tools, even good descriptions leave real misselection risk.
All names share a `pt_` prefix and snake_case, which is a strong baseline. But the verb_noun pattern is not consistent: many are noun-only or noun_verb (pt_cli, pt_screenshot, pt_diff, pt_export, pt_deploy, pt_device_power, pt_project_metadata, pt_canvas_info, pt_workspace_options). The result is readable but mixed in convention.
98 tools is far beyond the typical 3–15 range and imposes a heavy selection and context burden. The Packet Tracer domain is genuinely broad, so each tool has some justification, but the set is over-scoped and would benefit from consolidation (especially the plan/deploy pipeline and read-only topology snapshots).
The surface is remarkably comprehensive: planning, validation, deployment, device/link/module management, VLAN/STP/ACL/NAT/QoS/voice/BGP/HSRP, server services, host configuration, simulation, packet tracing, UI automation, and project lifecycle. Minor gaps exist—no dedicated pt_apply_ospf/eigrp/rip tools (routing is configured via plans or raw CLI) and some PT API limitations are acknowledged—but agents can work around these with pt_cli.