pt_apply_acl_object
Applies ACLs to Packet Tracer routers through the object API rather than CLI, reducing parsing errors and popups. Use for physical-port bindings; sub-interfaces require the CLI-based alternative.
Instructions
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.
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": {
"router": "<router>",
"name_or_number": "<name_or_number>",
"acl_type": "<acl_type>",
"entries": "<entries>"
},
"name": "pt_apply_acl_object"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| router | Yes | ||
| dry_run | No | ||
| entries | Yes | ||
| acl_type | Yes | ||
| name_or_number | Yes | ||
| replace_existing | No | ||
| binding_direction | No | in | |
| binding_interface | No |