Skip to main content
Glama
Packet Tracer MCP — Node.js port

Packet Tracer MCP — Node.js port

pt_read_dhcp_leases

Read real DHCP leases per pool—including IP, MAC, port, and lease time—to verify hosts received addresses from the correct pool; filter by router or server, or check all DHCP servers.

Instructions

Reads the REAL DHCP leases a server handed out: per pool, each lease's IP, MAC, port and lease time.

Router pools (ip dhcp pool) come from its DhcpServerProcess (measured on a 2911); a Server-PT's from each port's DHCP process. A pool whose leases this PT build cannot read says lease_api: false: unknown, not zero. Use it to check that hosts got their address from the right pool.

Parameters:

  • device: router or server name; empty = every DHCP server.

Example: pt_read_dhcp_leases(device="R1")

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "pt_read_dhcp_leases"
  }
}

Input Schema

NameRequiredDescriptionDefault
deviceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.11.0

TDQS

A4.4/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 the data source (DhcpServerProcess on a 2911, or per-port DHCP processes on a Server-PT) and a critical edge case — pools it cannot read report lease_api: false meaning 'unknown, not zero.' It does not cover permissions, ordering, or error behavior, so it is not exhaustive.

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 core action, then scoping detail, then parameters and an example. Mostly efficient, though the parenthetical implementation trivia ('measured on a 2911') is marginally extraneous for an agent deciding how to call it.

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?

With no output schema, the description must describe returns, and it does: per pool, each lease's IP, MAC, port, and lease time, plus the lease_api flag. It leaves the response container shape and error cases unstated, so it is strong but not fully complete.

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% for the single parameter, but the description fully compensates: 'device: router or server name; empty = every DHCP server' plus a worked example. This gives more meaning than the schema's bare string type and default.

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 (reads real DHCP leases) plus the exact scope (per pool, IP/MAC/port/lease time). This is clearly distinct from the sibling configuration tools like pt_configure_dhcp_server and pt_server_dhcp, which deal with setting up DHCP rather than reading leases.

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?

Gives a concrete usage context: 'Use it to check that hosts got their address from the right pool.' It also explains the device parameter's scoping behavior (empty = every DHCP server). It does not explicitly name a when-not case or an alternative tool, so it stops short of a 5.

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