enable_firewall_rule
Enable an existing MikroTik firewall filter rule by its comment, optionally narrowed by chain. Preview changes with confirm=False, then apply with confirm=True; never creates rules.
Instructions
Enable an EXISTING firewall filter rule (/ip/firewall/filter set disabled=no), resolved by its comment - optionally narrowed by
chain if more than one rule shares that comment.
SAFE BY DESIGN: this NEVER creates a rule. Intended workflow: an
admin creates a rule ahead of time on the device with a descriptive
comment (e.g. comment="Bloqueio_Ataque_X"), reviews it once, and
leaves it disabled; an LLM caller later enables it via this tool
when it detects the condition the rule exists to guard against. If
it goes wrong, the admin knows exactly which rule was toggled - the
same one they already wrote and reviewed. See README's "Firewall
rule toggle (by comment)" section.
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, so you can confirm WHICH rule this is -
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
| Name | Required | Description | Default |
|---|---|---|---|
| chain | No | ||
| comment | Yes | ||
| confirm | No | ||
| device_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||