Skip to main content
Glama

create_raw_rule

Creates an /ip firewall raw rule applied before connection tracking, enabling early packet filtering, notrack, jump, or address-list actions on MikroTik RouterOS.

Instructions

Creates an /ip firewall raw rule (applied before connection tracking).

Notes: chain: "prerouting" or "output", or a custom chain reached by jump. jump_target: required with action="jump". address_list (+ optional address_list_timeout, e.g. "1d"): required with add-src/dst-to-address-list. Prefix a matcher value with "!" to negate it. place_before: internal id ("*3") or print position ("0").

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": {
      "chain": "<chain>",
      "action": "<action>"
    },
    "name": "create_raw_rule"
  }
}

Input Schema

NameRequiredDescriptionDefault
logNo
ttlNo
dscpNo
portNo
chainYes
limitNo
actionYes
deviceNo
commentNo
disabledNo
dst_portNo
protocolNo
src_portNo
tcp_flagsNo
log_prefixNo
dst_addressNo
jump_targetNo
packet_sizeNo
src_addressNo
address_listNo
icmp_optionsNo
in_interfaceNo
place_beforeNo
out_interfaceNo
dst_address_listNo
dst_address_typeNo
src_address_listNo
src_address_typeNo
in_interface_listNo
out_interface_listNo
address_list_timeoutNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.28.1

TDQS

B3.3/5.0
Behavior4/5

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

Annotations already declare a non-read-only, non-destructive, non-idempotent, closed-world mutation. The description adds real behavioral context beyond that: the rule is evaluated before connection tracking, matcher values can be negated with a "!" prefix, and jump/address-list actions impose coupled requirements. It does not say whether the rule takes effect immediately or what happens with duplicate rules.

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?

Front-loads the one-line purpose then a compact notes list with no filler. The notes are slightly ragged in formatting and bury the conditional requirements mid-list, but nothing is wasted.

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?

Output schema and annotations cover returns and safety, but for a 31-parameter firewall rule constructor the description leaves most matchers unexplained, including formats for addresses, ports, protocol, and packet size. An agent could construct the two required fields but would have to guess at nearly every optional matcher.

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

Parameters2/5

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

Schema description coverage is 0% across 31 parameters, so the description must carry the burden and it only explains chain, jump_target, address_list, address_list_timeout, place_before, and the negation convention. Roughly two dozen matcher fields (ttl, dscp, packet_size, tcp_flags, icmp_options, port syntax, address_type variants, interface lists) get no format or meaning guidance at all.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource (creates an /ip firewall raw rule) and adds a differentiating semantic: it is applied before connection tracking, which distinguishes it in spirit from filter/NAT rule creators. It does not name a sibling explicitly, so it stops short of a 5.

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 notes give conditional usage rules (jump_target required with action="jump", address_list required with add-src/dst-to-address-list, valid chain values, place_before formats). That is strong guidance on how to call it, but there is no when-to-use-this-vs-alternatives guidance, e.g. raw rule versus create_filter_rule, or create versus update_raw_rule.

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