Skip to main content
Glama

pt_read_dhcp_leases

Read actual DHCP leases from routers and servers to verify each host received its IP from the correct pool, with per-pool IP, MAC, port, and lease time.

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

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 burden. It discloses data provenance (router pools from DhcpServerProcess measured on a 2911; Server-PT pools from each port's DHCP process) and an important edge case ('lease_api: false' means unknown, not zero). It does not discuss permissions or side effects, but as a read tool this is a strong behavioral disclosure.

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?

The description is front-loaded with the purpose, then technical details, then parameter explanation, and ends with an example. It is efficient overall, though the parenthetical '(measured on a 2911)' and some technical phrasing add slight bulk without being wasteful.

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?

Given a single optional parameter, an output schema, and no annotations, the definition covers the purpose, data source behavior, the lease_api edge case, and parameter semantics. It is nearly complete; a device-not-found case or pagination behavior is not mentioned, but neither is essential for this simple read operation.

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%, so the description must compensate. It does: 'device: router or server name; empty = every DHCP server' explains the parameter's meaning and the default behavior of an empty value, adding clear meaning beyond the bare schema type.

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 states a specific verb and resource: 'Reads the REAL DHCP leases a server handed out,' followed by the exact fields returned ('IP, MAC, port and lease time'). It does not explicitly differentiate itself from sibling read tools like pt_server_dhcp, but the focus on actual lease records is clear enough for selection.

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 provides a clear usage context: 'Use it to check that hosts got their address from the right pool.' No explicit when-not conditions or named alternatives are given, so it stops short of the top score.

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