pt_install_modules_batch
Installs multiple Packet Tracer modules across devices in a single batch run, avoiding repeated power cycles that can pause the script engine and disrupt bridge polling.
Instructions
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:
modules: list of dicts with {device, slot, module}. Example for RTR-4 with 4 serial ports on a 2911 (which does NOT accept NM-4A/S): [ {"device": "RTR-4", "slot": "0/0", "module": "HWIC-2T"}, {"device": "RTR-4", "slot": "0/1", "module": "HWIC-2T"} ] → gives Serial0/0/0..0/0/1, Serial0/1/0..0/1/1.
dry_run: if True, validates and returns the JS payload without sending it.
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.
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": {
"modules": "<modules>"
},
"name": "pt_install_modules_batch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | ||
| modules | Yes |