Skip to main content
Glama

pt_apply_nat

Applies NAT or PAT to a Cisco Packet Tracer router via IOS CLI, supporting static, dynamic, and PAT overload configurations for inside-to-outside address translation.

Instructions

Applies NAT or PAT to a router in PT's active topology (IOS CLI through the bridge).

  • router: device name in PT (e.g. "R1"; see pt_query_topology).

  • mode: "static" (1:1 fixed mapping, e.g. a server reachable from outside), "dynamic" (pool of public IPs) or "pat" (overload: many hosts share one public IP, the usual case).

  • inside_interface / outside_interface: LAN-side and WAN-side interfaces.

  • static_mappings: static only. [{"inside_local": "192.168.1.10", "inside_global": "200.1.1.5"}]

  • inside_networks: dynamic/pat. "network wildcard" strings, e.g. ["192.168.1.0 0.0.0.255"] (not CIDR); emitted as an inline access-list.

  • acl_number: ACL number or name for the inside hosts (default "1").

  • pool_name, pool_start, pool_end, pool_netmask ("255.255.255.0" form): the public pool (dynamic, or pat without interface overload).

  • use_interface_overload: pat only. True = use outside_interface's IP instead of a pool.

  • dry_run: validate and return the payload without sending.

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

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>",
      "mode": "<mode>",
      "inside_interface": "<inside_interface>",
      "outside_interface": "<outside_interface>"
    },
    "name": "pt_apply_nat"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeYes
routerYes
dry_runNo
pool_endNo
pool_nameNoNAT-POOL
acl_numberNo1
pool_startNo
pool_netmaskNo
inside_networksNo
static_mappingsNo
inside_interfaceYes
outside_interfaceYes
use_interface_overloadNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.12.0

TDQS

A4.5/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 burden and does well: it discloses that changes go out as live IOS CLI via the bridge, that dry_run validates and returns the payload without sending, and that inside_networks is emitted as an inline access-list (a side effect an agent should know about). It does not say whether existing NAT config is overwritten, whether the call is idempotent, or what happens if interfaces are unconfigured.

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?

The purpose is front-loaded in one sentence, followed by a scannable parameter list ordered roughly by importance, ending with a copy-ready typical invocation and a pointer to deeper guidance. Given 13 parameters with zero schema descriptions, no bullet is padding.

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?

For a complex 13-parameter mutation tool with no annotations, the definition covers modes, all parameter formats, a worked example, and defers to pt://guide for full mode guidance; the output schema handles return values. The remaining gap is operational preconditions — required interface state and behavior when NAT already exists — which an agent would need before invoking.

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 description coverage is 0% with 13 parameters, so the description must compensate entirely, and it does: every parameter is explained with format or example, including the JSON shape for static_mappings, the warning that inside_networks takes "network wildcard" strings and not CIDR, the dotted-quad form for pool_netmask, the pat-only restriction on use_interface_overload, and the default ACL number.

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 NAT or PAT to a router") plus the execution channel (IOS CLI through the bridge) and the scope (PT's active topology). An agent can immediately tell this is a config-write operation distinct from pt_read_nat or pt_remove_nat without opening the schema.

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 mode bullets give real selection criteria — static is framed as "1:1 fixed mapping, e.g. a server reachable from outside", dynamic as a public IP pool, and pat as "the usual case" — and a concrete "Typical PAT" recipe is supplied. It stops short of naming sibling tools as alternatives or stating when not to use it (e.g., re-applying over an existing NAT config).

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