Skip to main content
Glama

enable_nat_rule

Enable an existing MikroTik firewall NAT rule by its comment, optionally scoped to srcnat or dstnat. Never creates rules; previews changes before applying when confirm is false.

Instructions

Enable an EXISTING firewall NAT rule (/ip/firewall/nat set disabled=no), resolved by its comment - optionally narrowed by chain (srcnat/dstnat) if more than one rule shares that comment.

Same "never creates a rule" guarantee and comment-based resolution as enable_firewall_rule (see its docstring and README's "Firewall rule toggle (by comment)" section) - extended to /ip/firewall/nat.

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 - the FULL matched rule, not just its disabled field - without changing anything; call again with confirm=True to actually apply it. Errors clearly if no rule matches comment (narrowed by chain), or if more than one still does (AmbiguousResourceError) - never guesses which one to toggle.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainNo
commentYes
confirmNo
device_nameYes

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, the description carries the full burden and delivers: a hard write guard (MICROTIK_ALLOW_WRITE=true), a two-step confirm preview/apply flow, the non-destructive resolution behavior, and explicit error semantics. This is well beyond what any structured field provides.

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?

Front-loaded with the core action and constraint, and the guard/confirm mechanics are gathered in a clearly labeled block. It is slightly verbose with a cross-reference to the sibling docstring and README, but no sentence is wasted and the structure aids scanning.

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?

An output schema exists, so return values needn't be explained, and the description still notes the preview returns the full matched rule. For a guarded mutation tool with four parameters, the write guard, confirm flow, and error modes are all covered.

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 coverage is 0%, so the description must compensate. It explains `comment` (the resolution key), `chain` (srcnat/dstnat narrowing when comments collide), and `confirm` (preview vs apply). However, `device_name` is never described, leaving one of four parameters ambiguous.

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 ('enable') and resource ('an EXISTING firewall NAT rule'), with the underlying operation (`/ip/firewall/nat set disabled=no`) made explicit. It clearly distinguishes itself from siblings by clarifying it 'never creates a rule' and frames itself as the NAT counterpart to `enable_firewall_rule`.

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?

Explicit about when it applies (existing rule resolved by comment, optionally narrowed by chain) and the exact workflow: confirm=False for a preview, confirm=True to apply. It also names the failure conditions (no match, AmbiguousResourceError) and states it never guesses, leaving nothing to inference.

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