Skip to main content
Glama

update_nat_rule

Idempotent

Update an existing NAT rule on MikroTik RouterOS by specifying its ID and modifying parameters like addresses, ports, protocol, and interfaces. Modify firewall NAT configuration without recreating rules.

Instructions

Updates an existing NAT rule on the MikroTik device.

Notes: rule_id: use the ID from list output e.g. "*1" or "0" to_addresses: single IP or range e.g. "10.0.0.1" or "10.0.0.1-10.0.0.10" to_ports: single port or range e.g. "8080" or "8080-8090" Pass "" to clear an optional field.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
logNo
chainNo
actionNo
deviceNo
commentNo
rule_idYes
disabledNo
dst_portNo
protocolNo
src_portNo
to_portsNo
log_prefixNo
dst_addressNo
src_addressNo
in_interfaceNo
to_addressesNo
out_interfaceNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations already declare idempotentHint=true, destructiveHint=false, and openWorldHint=false. The description adds valuable behavioral context by explaining how to clear optional fields with an empty string (""), which implies that omitted fields retain their current values. This goes beyond the structured annotations and clarifies partial-update semantics.

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?

The description is compact and front-loaded: a one-sentence purpose followed by concise bullet-point notes for key parameters. Every sentence adds value, with no irrelevant information or repetition of schema details.

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

Completeness3/5

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

Given the tool's complexity (17 parameters) and minimal schema descriptions, the description could be more complete. It does not explicitly state that only provided fields are updated, nor does it mention error behavior for nonexistent rule IDs. The clearing instruction is helpful but a brief note on partial-update semantics would make it more robust.

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?

With zero schema description coverage, the description compensates by explaining the format for rule_id, to_addresses, and to_ports (e.g., single IP or range). However, it covers only 3 of 17 parameters, leaving many optional fields (like chain, action, protocol) unexplained. The general rule about clearing fields with "" adds some value, but overall parameter guidance is incomplete.

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?

The description clearly states the tool's function: 'Updates an existing NAT rule on the MikroTik device.' The verb 'Updates' paired with 'existing' distinguishes it from related sibling tools like create_nat_rule, remove_nat_rule, enable_nat_rule, and disable_nat_rule.

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?

The description implies when to use the tool by emphasizing 'existing NAT rule' and instructing to use the 'ID from list output' for rule_id. This gives clear context for updating existing rules, though it does not explicitly name alternatives or state when not to use it.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jeff-nasseri/mikrotik-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server