Skip to main content
Glama

pt_server_dhcp

Creates or edits a DHCP pool on a Packet Tracer server, controls the DHCP service, and manages pool removal or address exclusions.

Instructions

A Server-PT's Services > DHCP: creates or edits a pool and switches it on.

  • pool: name ("serverPool" is the factory one: editing it is the most common case). Touched only if a pool field below is given; if it doesn't exist it is created with those values.

  • gateway, dns, start_ip, mask ("255.255.255.0" or "24"), max_users, tftp, wlc: empty/0 = leave alone. PT's script API has no TFTP/WLC setter, so tftp/wlc always come back in not_applied (set them in the GUI). Every field is read back: any PT does not hold comes back in not_applied, with ok=false.

  • enable: True = Service On (default), False = Off, None = leave alone.

  • remove_pool: deletes that pool (alone, it creates nothing).

  • exclude: ranges to exclude, ["192.168.1.1-192.168.1.9"]; they apply to the port's DHCP server, never create or edit a pool.

  • interface: the server's port (default: the first one). Hosts use it with pt_host_ip_config(mode="dhcp").

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": {
      "device": "<device>"
    },
    "name": "pt_server_dhcp"
  }
}

Input Schema

NameRequiredDescriptionDefault
dnsNo
wlcNo
maskNo
poolNoserverPool
showNo
tftpNo
deviceYes
enableNo
captureNo
excludeNo
gatewayNo
start_ipNo
interfaceNo
max_usersNo
output_dirNoscreenshots
remove_poolNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.12.0

TDQS

A4.2/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so unusually well: it discloses that the PT script API has no TFTP/WLC setter so those fields always return not_applied, that every field is read back and any value PT does not hold comes back in not_applied with ok=false, and that exclude ranges apply to the port's DHCP server rather than creating a pool. Creation-vs-edit semantics ('if it doesn't exist it is created with those values') and deletion semantics are both spelled out.

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?

Purpose is front-loaded in one line, then a scannable bulleted list keyed to parameter groups, with the closing line pointing at pt_host_ip_config(mode="dhcp"). Given 16 parameters the length is justified, though a few parentheticals (e.g. the factory-pool remark) could be tightened.

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 16-parameter mutation tool with an output schema (so return values need no prose), the definition covers the tricky semantics an agent would otherwise get wrong: leave-alone defaults, not_applied read-back, deletion, and exclude scope. The remaining gap is the unexplained device/show/capture/output_dir parameters, particularly the required device.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across 16 parameters, so the description must compensate, and for most fields it does: mask accepts '255.255.255.0' or '24', exclude takes ranges like ['192.168.1.1-192.168.1.9'], interface defaults to the first port, enable is a tri-state. However, device (the only required parameter), show, capture, and output_dir are never mentioned, leaving four parameters with no explanation anywhere.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb+resource+scope: 'A Server-PT's Services > DHCP: creates or edits a pool and switches it on.' An agent immediately knows this mutates a DHCP pool on a server device. It does not differentiate itself from the overlapping sibling pt_configure_dhcp_server, and only names pt_host_ip_config as a consumer rather than a boundary, so it falls short of a 5.

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?

It gives concrete when-to-do-what guidance per field: 'empty/0 = leave alone', 'enable: True = Service On (default), False = Off, None = leave alone', and 'remove_pool: deletes that pool (alone, it creates nothing)'. It also clarifies that 'serverPool' is the factory pool and editing it is the common case. What's missing is any statement of when NOT to use this tool versus the sibling DHCP tools listed.

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