Skip to main content
Glama

add_nat_rule

Configures NAT rules for MikroTik routers, enabling port forwarding and masquerade. Supports dstnat, srcnat chains with optional parameters.

Instructions

Tambah aturan NAT (port-forward / masquerade). BUTUH MIKROCLAW_ALLOW_WRITE=true.

Contoh port-forward (TCP 8080 publik -> 192.168.88.10:80): chain='dstnat', action='dst-nat', protocol='tcp', dst_port='8080', to_addresses='192.168.88.10', to_ports='80' Contoh masquerade WAN: chain='srcnat', action='masquerade', out_interface='ether1'

Args: chain: 'dstnat' atau 'srcnat'. action: mis. 'dst-nat', 'src-nat', 'masquerade'. protocol/dst_port/to_addresses/to_ports/src_address/dst_address/ in_interface/out_interface: opsional, isi sesuai kebutuhan. comment: catatan pada aturan.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainYes
actionYes
commentNoadded-by-mikroclaw
dst_portNo
protocolNo
to_portsNo
dst_addressNo
src_addressNo
in_interfaceNo
to_addressesNo
out_interfaceNo
Behavior3/5

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

As no annotations are provided, the description must convey behavioral traits. It describes the additive nature of creating a rule and notes the default comment. Yet it lacks details on error handling, idempotency, or potential side effects.

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 well-structured: purpose, prerequisite, examples, then parameter list. It is front-loaded and efficient, though slightly verbose with example repetition.

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?

The description covers all parameters and common use cases, but it does not describe return values or error conditions. Given the tool's complexity (11 params, no output schema), it is nearly complete but lacks operational details.

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

Parameters5/5

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

With 0% schema coverage, the description fully compensates by explaining all parameters, listing optional ones, and providing usage examples for chain, action, and others. This adds significant meaning beyond the bare schema.

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 adds NAT rules (port-forward/masquerade) and provides concrete examples. It distinguishes from siblings like add_firewall_drop by focusing on NAT operations.

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 includes a prerequisite (MIKROCLAW_ALLOW_WRITE=true) and examples for port-forward and masquerade, showing when each is used. However, it does not explicitly mention when not to use this tool or suggest alternatives.

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/Syamsuddin/MikroCLAW'

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