Skip to main content
Glama

create_nat_rule

Create NAT rules on MikroTik routers for srcnat or dstnat. Set chain, action, addresses, ports, and interfaces to manage traffic translation.

Instructions

Creates a NAT rule (srcnat or dstnat) on the MikroTik device.

Notes: 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" place_before: rule number or ID (*N) to insert before e.g. "0" or "*3"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
logNo
chainYes
actionYes
deviceNo
commentNo
disabledNo
dst_portNo
protocolNo
src_portNo
to_portsNo
log_prefixNo
dst_addressNo
src_addressNo
in_interfaceNo
place_beforeNo
to_addressesNo
out_interfaceNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

Annotations declare destructiveHint false, so the agent already knows this is not destructive. The description adds minimal behavioral context by explaining place_before as 'rule number or ID (*N) to insert before,' which hints at insertion ordering, but it does not disclose other behavioral traits like rule ordering defaults, effect on existing rules, or whether the rule is applied immediately. With annotations present, this is adequate but not rich.

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 concise, with one lead sentence and three bullet-point notes. Every sentence serves a purpose, though the structure could be tighter by aligning notes with the actual parameter names. No unnecessary fluff is present.

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?

With 17 parameters, no schema descriptions, and only three parameters covered, the description is incomplete. It omits semantics for required fields like chain and action, does not explain valid action values, and provides no context about the NAT rule lifecycle relative to sibling tools. The presence of an output schema reduces the need to describe return values, but the overall guidance is still insufficient for complex use cases.

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

Parameters2/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 provides format examples for only three of seventeen parameters (to_addresses, to_ports, place_before), leaving critical parameters like action, protocol, and log_prefix unexplained. This is insufficient for an agent to correctly populate many fields.

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 uses the specific verb 'Creates' and identifies the resource as 'a NAT rule (srcnat or dstnat) on the MikroTik device,' which clearly distinguishes it from sibling tools like create_filter_rule. It conveys the exact scope of the operation without ambiguity.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives such as update_nat_rule, remove_nat_rule, or move_nat_rule. It also omits any prerequisites or context that would help an agent decide between creating a NAT rule and other firewall operations.

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