Skip to main content
Glama

create_filter_rule

Create a firewall filter rule in a specified chain to control traffic on MikroTik RouterOS. Define match conditions and action to enforce network security policies.

Instructions

Creates a firewall filter rule in the specified chain on the MikroTik device.

Notes: connection_state: comma-separated e.g. "established,related,new,invalid" limit: RouterOS rate/burst string e.g. "10,5:packet" or "10/1s:packet" tcp_flags: RouterOS flag expression e.g. "syn,!ack" place_before: rule number or ID (*N) to insert before e.g. "0" or "*3" in_interface_list/out_interface_list: name of an /interface list (e.g. "LAN", "WAN") rather than a single interface

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
logNo
chainYes
limitNo
actionYes
deviceNo
commentNo
disabledNo
dst_portNo
protocolNo
src_portNo
tcp_flagsNo
log_prefixNo
dst_addressNo
src_addressNo
in_interfaceNo
place_beforeNo
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

B3.1/5.0
Behavior2/5

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

Annotations provide destructiveHint=false and openWorldHint=false but no readOnlyHint, so the description carries the burden of disclosing mutation behavior. The description simply says 'Creates' without explaining effects, reversibility, required permissions, or what happens to existing rules. It does not contradict annotations, but it adds no behavioral context beyond the obvious creation action.

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?

The description is two sentences plus a structured bullet list of parameter notes. It is concise, front-loaded with the core purpose, and each note is directly useful. The bullet format is scannable and avoids redundancy. There is minimal waste, though the main sentence could be slightly more specific about IPv4 vs IPv6.

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

Completeness2/5

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

With 23 parameters, 0% schema coverage, and a mutation operation, the description should provide thorough guidance. It covers only a handful of parameters and does not explain common fields like addresses, ports, protocol, or log_prefix. There is no mention of how the rule interacts with existing rules or what the output schema returns. The description is insufficient for an agent to correctly construct many valid invocations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It provides format examples for connection_state, limit, tcp_flags, place_before, and interface lists, which are helpful for those specific parameters. However, the remaining 17 parameters (e.g., src_address, dst_port, protocol, log_prefix) have no explanation in either the schema or description. The description adds value for a subset but is incomplete for a 23-parameter tool.

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 clearly states 'Creates a firewall filter rule in the specified chain on the MikroTik device.' This gives a specific verb (creates), resource (firewall filter rule), and scope (specified chain). It distinguishes from sibling tools like create_nat_rule and create_ipv6_filter_rule by the tool name and explicit mention of 'firewall filter rule'. No ambiguity.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like create_nat_rule or create_ipv6_filter_rule. It does not mention scenarios, prerequisites, or exclusions. The only usage-related information is a list of parameter format notes, which are not selection criteria.

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