Skip to main content
Glama

enable_mangle_rule

Enable an existing MikroTik firewall mangle rule by its comment, optionally narrowing by chain. Preview the matched rule first, then confirm to apply; never creates or guesses a rule.

Instructions

Enable an EXISTING firewall mangle rule (/ip/firewall/mangle set disabled=no), resolved by its comment - optionally narrowed by chain (e.g. prerouting/postrouting/forward/input/output) if more than one rule shares that comment.

Same "never creates a rule" guarantee and comment-based resolution as enable_firewall_rule - extended to /ip/firewall/mangle.

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 to lean on, the description carries the full burden and does so well: it discloses the MIKROTIK_ALLOW_WRITE gate, the never-creates guarantee, the before/after preview semantics (full matched rule, not just disabled), and AmbiguousResourceError behavior.

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 resolution mechanism before behavioral details. It is somewhat long, but every sentence adds operational value; the only slack is the borderline-redundant restatement of the sibling guarantee.

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?

Given 4 params, a write guard, and an existing output schema (so return values need not be explained), the description covers everything needed to call it correctly and safely: guard, preview flow, resolution rules, and failure modes.

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 as the resolution key, chain as an optional narrowing filter with example values, and confirm's preview/apply meaning. Only device_name is left implicit, which is minor and self-evident.

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+resource (enable an existing /ip/firewall/mangle rule) and the exact underlying operation (set disabled=no). It distinguishes itself from sibling enable_firewall_rule and clarifies resolution-by-comment, so an agent can tell it apart from the firewall/NAT mangle variants.

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?

Explicitly ties the confirm flag to a workflow: confirm=False for a preview, confirm=True to apply. It also states when the tool errors (no match, or ambiguity) and that it never guesses, which directly guides correct invocation.

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