Skip to main content
Glama

add_static_dhcp_lease

Create a static DHCP lease to pin an IP address to a MAC address, giving clients a stable, predictable IP. Preview changes first, then confirm to apply.

Instructions

Create a static DHCP lease (/ip/dhcp-server/lease), pinning address to mac_address. Useful to give a client a stable, predictable IP - e.g. before limiting it with set_client_bandwidth.

WRITE tool, guarded: blocked entirely unless the server is running with MIKROTIK_ALLOW_WRITE=true. Call with confirm=False (the default) to get a before/after preview without changing anything; call again with confirm=True to actually apply it. Errors clearly (without creating anything) if a lease for mac_address already exists on the device - it never creates a duplicate.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serverNo
addressYes
commentNo
confirmNo
device_nameYes
mac_addressYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.11.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations present, the description carries the full burden and does so: it declares this a WRITE tool, states it is blocked unless MIKROTIK_ALLOW_WRITE=true, explains the default no-op preview mode, and specifies non-duplicate error behavior when a lease already exists.

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?

Three short, front-loaded paragraphs with no filler; purpose leads and the safety/invocation caveats follow. Marginally longer than strictly necessary but every sentence carries useful information.

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

Completeness5/5

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

Output schema exists so return values need not be described, and the description covers the guard, the preview workflow, and the duplicate-lease failure mode an agent must anticipate before calling.

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 6 parameters, so the description must compensate. It explains address, mac_address, and the confirm flag semantics well, and the resource path implies server, but comment and device_name are never explained, leaving a measurable gap.

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 ('Create a static DHCP lease (/ip/dhcp-server/lease)') and pins the outcome ('pinning address to mac_address'), which distinguishes it from remove_dhcp_lease and the read-only dhcp_leases sibling.

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?

Gives the use case (stable, predictable IP) and names the downstream sibling it enables ('before limiting it with set_client_bandwidth'), plus the two-step confirm=False then confirm=True invocation condition. An agent knows exactly when and how to call it.

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