update_filter_rule
Modify an existing MikroTik firewall filter rule by rule ID, updating fields such as chain, action, addresses, ports, protocol, and connection state.
Instructions
Updates an existing firewall filter rule on the MikroTik device.
Notes: rule_id: positional number from list output (e.g. "12") or internal ID (e.g. "*1A") connection_state: comma-separated e.g. "established,related" limit: RouterOS rate string e.g. "10,5:packet" tcp_flags: RouterOS flag expression e.g. "syn,!ack" Pass "" to clear an optional field (e.g. src_address="").
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": {
"rule_id": "<rule_id>"
},
"name": "update_filter_rule"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| log | No | ||
| chain | No | ||
| limit | No | ||
| action | No | ||
| device | No | ||
| comment | No | ||
| rule_id | Yes | ||
| disabled | No | ||
| dst_port | No | ||
| protocol | No | ||
| src_port | No | ||
| tcp_flags | No | ||
| log_prefix | No | ||
| dst_address | No | ||
| src_address | No | ||
| in_interface | No | ||
| out_interface | No | ||
| connection_state | No | ||
| dst_address_list | No | ||
| src_address_list | No | ||
| in_interface_list | No | ||
| out_interface_list | No | ||
| connection_nat_state | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |