Skip to main content
Glama

update_filter_rule

Idempotent

Update an existing firewall filter rule on a MikroTik device by specifying its ID and modifying parameters like addresses, ports, protocols, or actions.

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="").

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
logNo
chainNo
limitNo
actionNo
deviceNo
commentNo
rule_idYes
disabledNo
dst_portNo
protocolNo
src_portNo
tcp_flagsNo
log_prefixNo
dst_addressNo
src_addressNo
in_interfaceNo
out_interfaceNo
connection_stateNo
dst_address_listNo
src_address_listNo
in_interface_listNo
out_interface_listNo
connection_nat_stateNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.19.4
    • addedInput schema / properties / in_interface_list
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "In Interface List"
      +}
    • addedInput schema / properties / out_interface_list
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Out Interface List"
      +}
  2. Changed1 schema field changedv0.14.5
    • addedInput schema / properties / device
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Device"
      +}
  3. First observedv0.0.0

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare idempotent and non-destructive behavior; the description adds value by explaining the accepted forms of rule_id, RouterOS-specific formats for connection_state, limit, and tcp_flags, and the use of an empty string to clear optional fields. It stops short of explicitly stating that null leaves a field unchanged, but the key behavioral traits are covered.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is one sentence plus a compact bullet list of notes, with the most important rule_id guidance first. Every sentence earns its place and there is no redundant restatement of the schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 23-parameter mutation tool with no parameter descriptions in the schema, the description covers the critical formats and clearing behavior, and an output schema exists to cover return values. However, it does not explicitly state null-vs-empty semantics or when to prefer sibling tools, leaving some completeness gaps for an agent invoking it autonomously.

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?

With 0% schema description coverage, the description carries the burden for parameter meaning and does so for the hardest fields: rule_id's two accepted ID forms and the exact RouterOS syntax for connection_state, limit, and tcp_flags. The general clearing rule also applies to all optional fields, though many self-explanatory parameters receive no individual examples.

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?

The description opens with 'Updates an existing firewall filter rule on the MikroTik device', using a specific verb, resource, and lifecycle state. This clearly separates it from sibling create, remove, enable, disable, and move tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrasing 'existing ... rule' implies the tool is for modifying an already-created filter rule rather than creating one, but no alternative tools are named and no when-to-use/when-not-to-use conditions are given. An agent must infer the appropriate choice from the tool name and sibling list.

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