Skip to main content
Glama
coreyhines

coreyhines/opnsense-mcp

by coreyhines

dhcp

Manage DHCP leases, static reservations, ranges, options, and per-subnet DNS on OPNsense. Create, list, update, move, or delete records and apply changes now or staged.

Instructions

DHCP: leases, static reservations, ranges, options and per-subnet DNS. Call action='help' for each action's fields and rules.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ipNo[delete_lease] IP address to delete
macNo[create_host, delete_lease] MAC address (e.g. 'aa:bb:cc:dd:ee:ff')
tagNo[set_router] Tag uuid to scope to instead of an interface
hostNo[delete_host, move_host] Hostname, MAC, or reservation uuid to delete
ipv4No[create_host, move_host] IPv4 address to assign (e.g. '172.20.8.50')
ipv6No[create_host, move_host] IPv6 suffix: integer (e.g. 50 → ::50) or '::abcd'
slotNo[set_dns] Optional slot index (1 or 2) for single-address updates
uuidNoRecord to act on, identified by a list action.
applyNoApply now rather than leaving the change staged. The default differs by action; action='help' reports each one.
descrNo[create_host, list_hosts] Optional description
forceNo[set_router] Send the option even when the client did not ask
actionYesOperation to run. 'help' lists fields.
domainNo[create_host, create_range, update_range] Optional domain for the host (e.g. 'lan')
familyNo[set_dns] Address family to update: ipv4 or ipv6
routerNo[set_router] Gateway address to advertise
searchNo[leases, list_hosts] Filter leases by hostname, IP, or MAC address. Omit for full table.
subnetNo[list_dns, set_dns, toggle_range] Subnet in CIDR notation (e.g. 172.20.2.0/24)
confirmNoToken returned by the previous call, to confirm.
enabledNoTarget state, set explicitly rather than flipped.
end_addrNo[create_range, update_range] Last address
hostnameNo[create_host, delete_lease] Hostname for the reservation (e.g. 'mydevice')
client_idNo[create_host, move_host] Optional DHCP client identifier / DUID for IPv6 (e.g. '52:54:00:7e:9c:f4:00:ab:cd:01'). Accepts optional 'id:' prefix.
interfaceNo[create_range, list_dns, set_dns, set_router, toggle_range] Interface key, e.g. opt3
dns_serverNo[set_dns] Single DNS server address
lease_timeNo[create_range, update_range] Seconds, or a suffixed value like 2h
start_addrNo[create_range, update_range] First address
descriptionNoFree-text note stored on the record.
dns_serversNo[set_dns] One or two DNS server addresses
subnet_maskNo[create_range, update_range] subnet_mask
missing_ipv6No[list_hosts] When true, return only reservations with IPv4 but no ::N IPv6 suffix
new_hostnameNo[move_host] New dnsmasq host reservation name (optional rename)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed33 schema fields changedv1.0.0
    • addedInput schema / properties / action
      Added value: +{
      +  "description": "Operation to run. 'help' lists fields.",
      +  "enum": [
      +    "create_host",
      +    "create_range",
      +    "delete_host",
      +    "delete_lease",
      +    "delete_option",
      +    "delete_range",
      +    "leases",
      +    "list_dns",
      +    "list_hosts",
      +    "list_options",
      +    "list_ranges",
      +    "move_host",
      +    "set_dns",
      +    "set_router",
      +    "toggle_range",
      +    "update_range",
      +    "help"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / apply
      Added value: +{
      +  "description": "Apply now rather than leaving the change staged. The default differs by action; action='help' reports each one.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / client_id
      Added value: +{
      +  "description": "[create_host, move_host] Optional DHCP client identifier / DUID for IPv6 (e.g. '52:54:00:7e:9c:f4:00:ab:cd:01'). Accepts optional 'id:' prefix.",
      +  "type": "string"
      +}
    • addedInput schema / properties / confirm
      Added value: +{
      +  "description": "Token returned by the previous call, to confirm.",
      +  "type": "string"
      +}
    • addedInput schema / properties / descr
      Added value: +{
      +  "description": "[create_host, list_hosts] Optional description",
      +  "type": "string"
      +}
    • addedInput schema / properties / description
      Added value: +{
      +  "description": "Free-text note stored on the record.",
      +  "type": "string"
      +}
    • addedInput schema / properties / dns_server
      Added value: +{
      +  "description": "[set_dns] Single DNS server address",
      +  "type": "string"
      +}
    • addedInput schema / properties / dns_servers
      Added value: +{
      +  "description": "[set_dns] One or two DNS server addresses",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / domain
      Added value: +{
      +  "description": "[create_host, create_range, update_range] Optional domain for the host (e.g. 'lan')",
      +  "type": "string"
      +}
    • addedInput schema / properties / enabled
      Added value: +{
      +  "description": "Target state, set explicitly rather than flipped.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / end_addr
      Added value: +{
      +  "description": "[create_range, update_range] Last address",
      +  "type": "string"
      +}
    • addedInput schema / properties / family
      Added value: +{
      +  "description": "[set_dns] Address family to update: ipv4 or ipv6",
      +  "type": "string"
      +}
    • addedInput schema / properties / force
      Added value: +{
      +  "description": "[set_router] Send the option even when the client did not ask",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / host
      Added value: +{
      +  "description": "[delete_host, move_host] Hostname, MAC, or reservation uuid to delete",
      +  "type": "string"
      +}
    • addedInput schema / properties / hostname
      Added value: +{
      +  "description": "[create_host, delete_lease] Hostname for the reservation (e.g. 'mydevice')",
      +  "type": "string"
      +}
    • addedInput schema / properties / interface
      Added value: +{
      +  "description": "[create_range, list_dns, set_dns, set_router, toggle_range] Interface key, e.g. opt3",
      +  "type": "string"
      +}
    • addedInput schema / properties / ip
      Added value: +{
      +  "description": "[delete_lease] IP address to delete",
      +  "type": "string"
      +}
    • addedInput schema / properties / ipv4
      Added value: +{
      +  "description": "[create_host, move_host] IPv4 address to assign (e.g. '172.20.8.50')",
      +  "type": "string"
      +}
    • addedInput schema / properties / ipv6
      Added value: +{
      +  "description": "[create_host, move_host] IPv6 suffix: integer (e.g. 50 → ::50) or '::abcd'",
      +  "type": [
      +    "integer",
      +    "string"
      +  ]
      +}
    • addedInput schema / properties / lease_time
      Added value: +{
      +  "description": "[create_range, update_range] Seconds, or a suffixed value like 2h",
      +  "type": "string"
      +}
    • addedInput schema / properties / mac
      Added value: +{
      +  "description": "[create_host, delete_lease] MAC address (e.g. 'aa:bb:cc:dd:ee:ff')",
      +  "type": "string"
      +}
    • addedInput schema / properties / missing_ipv6
      Added value: +{
      +  "description": "[list_hosts] When true, return only reservations with IPv4 but no ::N IPv6 suffix",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / new_hostname
      Added value: +{
      +  "description": "[move_host] New dnsmasq host reservation name (optional rename)",
      +  "type": "string"
      +}
    • addedInput schema / properties / router
      Added value: +{
      +  "description": "[set_router] Gateway address to advertise",
      +  "type": "string"
      +}
    • changedInput schema / properties / search / description
      Previous value: -"Search by hostname/IP/MAC"New value: +"[leases, list_hosts] Filter leases by hostname, IP, or MAC address. Omit for full table."
    • removedInput schema / properties / search / optional
      Removed value: -true
    • addedInput schema / properties / slot
      Added value: +{
      +  "description": "[set_dns] Optional slot index (1 or 2) for single-address updates",
      +  "type": "integer"
      +}
    • addedInput schema / properties / start_addr
      Added value: +{
      +  "description": "[create_range, update_range] First address",
      +  "type": "string"
      +}
    • addedInput schema / properties / subnet
      Added value: +{
      +  "description": "[list_dns, set_dns, toggle_range] Subnet in CIDR notation (e.g. 172.20.2.0/24)",
      +  "type": "string"
      +}
    • addedInput schema / properties / subnet_mask
      Added value: +{
      +  "description": "[create_range, update_range] subnet_mask",
      +  "type": "string"
      +}
    • addedInput schema / properties / tag
      Added value: +{
      +  "description": "[set_router] Tag uuid to scope to instead of an interface",
      +  "type": "string"
      +}
    • addedInput schema / properties / uuid
      Added value: +{
      +  "description": "Record to act on, identified by a list action.",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[]New value: +[
      +  "action"
      +]
  2. First observedv1.8.0

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only says to call action='help' for rules, but it does not mention that many actions mutate state, that changes may be staged rather than applied, that some actions require a confirm token,, or that delete actions exist. The schema hints at these behaviors via 'apply' and 'confirm' params, but the description itself gives no behavioral transparency.

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?

Two short sentences: the first states scope, the second gives an actionable pointer for details. No filler. For a tool with 31 params, this concise front-loaded structure is appropriate and every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 31-parameter, 17-action tool with no output schema and no annotations, this description is not complete enough. It does give a useful help hook, but it fails to convey the breadth of actions, the mutation vs read distinction, the staging/confirmation model, or any guidance on choosing among sibling network tools. An agent can begin but cannot safely invoke correctly without extra calls and risky inference.

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

Parameters3/5

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

Schema description coverage is 100%, so the baseline is 3; the schema already documents all 31 parameters and their action-specific scoping. The description adds nothing about parameter semantics, only directing the user to action='help' for per-action field rules. It doesn't add value beyond schema but also doesn't mislead.

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 names the resource domain clearly ('DHCP: leases, static reservations, ranges, options and per-subnet DNS') and distinguishes it from sibling tools by domain and resource types. It does not use a single specific verb, but for a multi-action dispatcher tool this is acceptable. The pointer to action='help' adds practical clarity about how to learn the available operations.

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

Usage Guidelines3/5

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

The scope statement implies 'use this for DHCP management', which is reasonable given sibling names like bgp, alias, and dns_override. It does not explicitly say when not to use this tool or name alternatives. The instruction to call action='help' for field and rules is useful usage guidance, but only within the tool, not between tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.