disable_mangle_rule
Disable an existing MikroTik firewall mangle rule by matching its comment (optionally chain). Preview first with confirm=False, then apply with confirm=True; errors if no match or ambiguous.
Instructions
Disable an EXISTING firewall mangle rule (/ip/firewall/mangle set disabled=yes), resolved by its comment - optionally narrowed by
chain.
Same "never creates a rule" guarantee and comment-based resolution
as enable_mangle_rule.
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 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).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"device_name": "<device_name>",
"comment": "<comment>"
},
"name": "disable_mangle_rule"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | No | ||
| comment | Yes | ||
| confirm | No | ||
| device_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||