Skip to main content
Glama
OPNsense MCP Server

OPNsense MCP Server

by lucamarien

opn_list_dhcp_leases

Lists current DHCPv4 leases from a legacy ISC DHCP server, returning address, MAC, and hostname entries. Verify the active DHCP backend before use, since most instances now run dnsmasq or Kea.

Instructions

List current DHCPv4 leases from the ISC DHCP server (legacy).

Use this when the OPNsense instance uses the ISC DHCP plugin (os-isc-dhcp). ISC DHCP is legacy and being phased out — most 26.x instances use dnsmasq or Kea. Use opn_scan_config first to check which DHCP backend is active. Returns: dict with DHCP lease entries including address, mac, and hostname fields. (If the API answers with a bare array, it arrives wrapped in the 'rows'/'rowCount' envelope.)

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

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4.5/5.0
Behavior4/5

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

No annotations exist, so the description carries the full burden, and it does disclose meaningful behavior: the read-only listing nature, the legacy/deprecation status of the backend, and the prerequisite backend check. What it omits is the failure behavior when ISC DHCP is not installed or not running (error vs. empty list), which is the main remaining unknown for a mutation-free call.

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 purpose, then backend caveat, then prerequisite, then return shape — a sensible ordering with no filler. The trailing parenthetical about a bare array arriving in a 'rows'/'rowCount' envelope is slightly awkwardly worded and partly overlaps the existing output schema, but it carries real value.

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 zero parameters and an existing output schema, the description covers what an agent needs to select the tool and route to the right backend sibling. The one gap is the missing statement of what the call returns or errors with when the ISC DHCP plugin is absent, which would fully close the loop on the deprecation warning it raises.

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?

The tool takes zero parameters, so there is no parameter semantics to explain and the baseline of 4 applies. The description correctly spends no words on inputs.

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 ("List current DHCPv4 leases") plus the exact backend it targets (ISC DHCP server / os-isc-dhcp plugin). This cleanly separates it from the sibling lease lister opn_list_kea_leases and opn_list_dnsmasq_leases without the agent needing to open any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when to use it (the instance runs the ISC DHCP plugin), warns that ISC DHCP is legacy and most 26.x systems use dnsmasq or Kea, and prescribes a concrete prerequisite action: call opn_scan_config first to determine the active backend. That is when-to-use, when-not-to-use, and the alternative-selection path all in one place.

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