Skip to main content
Glama

pt_apply_acl

Applies and validates Cisco ACLs on Packet Tracer routers, generating IOS CLI and optionally binding rules to interfaces for inbound or outbound traffic filtering.

Instructions

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.

  • router: device name in PT (see pt_query_topology).

  • name_or_number: 1-99/1300-1999 standard, 100-199/2000-2699 extended, any word = named ACL.

  • acl_type: "standard" (source only) or "extended" (source, destination, protocol, ports).

  • entries: list of dicts: action "permit"|"deny" (required); protocol "ip"|"icmp"|"tcp"|"udp"|... (default "ip"); source "any" | "host A.B.C.D" | "A.B.C.D wildcard" (required); destination (extended); source_port_op/source_port, dest_port_op/dest_port/dest_port_end (TCP/UDP, e.g. "eq"/80); icmp_type ("echo", "echo-reply", ...); tcp_flags (["established"]); log (bool); remark.

  • binding_interface: apply the ACL to this interface; empty = only define it.

  • binding_direction: "in" (default) or "out"; used only with binding_interface.

  • dry_run: validate and return the CLI/JS without sending.

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".

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"
  }
}

Input Schema

NameRequiredDescriptionDefault
routerYes
dry_runNo
entriesYes
acl_typeYes
name_or_numberYes
binding_directionNoin
binding_interfaceNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.12.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full load and does so well: it discloses validation of ranges, types, IPs/wildcards and unreachable rules, that it pushes config through configureIosDevice (a live write to the active topology), and that dry_run returns CLI/JS without sending. It stops short of stating idempotency, i.e. whether an existing ACL of the same name is merged, overwritten, or rejected.

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?

Front-loaded with the action and its side effects, then a scannable per-parameter bullet list where every bullet adds information the schema lacks. Slightly dense in the entries bullet, and the closing 'Full example: resource pt://guide' pointer is awkwardly phrased.

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?

Output schema exists, so return values need not be explained; the description still covers validation, side effects, and the dry-run escape hatch. The one substantive gap for a 7-parameter mutation tool is what happens on name collision or partial failure.

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 coverage is 0%, so the description must compensate, and it documents all seven parameters, including valid number ranges per ACL type, the named-ACL fallback, the nested entries dict field-by-field, and the scope of binding_direction. The worked example entry removes any remaining ambiguity about source/wildcard formatting.

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 and resource ('Applies an ACL to a router in PT's active topology') and then enumerates the full pipeline: validation, PT state checks, IOS CLI generation, and delivery via configureIosDevice. That is enough to separate it from pt_read_acl and pt_remove_acl by intent alone.

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 implied through parameter semantics: empty binding_interface means 'define only', binding_direction only matters with an interface, and dry_run validates without sending. It never states when to reach for pt_apply_acl_object or pt_read_acl instead, and gives no preconditions such as the router needing to exist or an existing binding being replaced.

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