Skip to main content
Glama

update_raw_rule

Idempotent

Modify an existing RouterOS /ip firewall raw rule by ID or position, adjusting match conditions, action, or logging; clear optional matchers by passing empty values.

Instructions

Updates an existing /ip firewall raw rule.

Notes: rule_id: a RouterOS internal id ("*1A") or a print position ("0"). Pass "" to clear an optional matcher (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_raw_rule"
  }
}

Input Schema

NameRequiredDescriptionDefault
logNo
ttlNo
dscpNo
portNo
chainNo
limitNo
actionNo
deviceNo
commentNo
rule_idYes
disabledNo
dst_portNo
protocolNo
src_portNo
tcp_flagsNo
log_prefixNo
dst_addressNo
jump_targetNo
packet_sizeNo
src_addressNo
address_listNo
icmp_optionsNo
in_interfaceNo
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.1/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, idempotentHint=true and openWorldHint=false, so the safety profile is covered. The description adds genuinely useful operational behavior: the two accepted rule_id formats and the convention that an empty string clears an optional matcher. It fails to disclose the most consequential behavior for an update tool with 31 optional fields: whether omitted parameters are left unchanged or reset.

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 purpose sentence is front-loaded and the two notes are dense, high-value lines with no filler. Formatting is slightly cramped (notes are appended without a clear statement of partial-update behavior), but nothing is redundant.

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?

For a 31-parameter mutation tool with no parameter descriptions in the schema, the definition is thin: partial-vs-full update semantics, field formats, and how to locate a valid rule_id are all absent. The output schema covers return values, so that omission is acceptable, but the input-side gaps remain significant.

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% (titles only), so the description must carry the load; it does document rule_id's dual format and the "" clearing convention that applies across all optional matcher fields, which is real added meaning. However, roughly 30 parameters (action enum, chain, addresses, timeouts) receive no semantic explanation at all, leaving the compensation incomplete.

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 ('Updates') plus the exact resource path ('/ip firewall raw rule'), which separates it from update_filter_rule and update_nat_rule siblings by object type. It does not explicitly name the IPv6 or create/remove counterparts, so sibling differentiation is only partial.

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?

Only the implicit precondition that the rule must already exist is conveyed by 'existing'. There is no guidance on how to obtain a rule_id (e.g. via list_raw_rules/get_raw_rule), no statement of when to prefer this over create_raw_rule or the IPv6 variant, and no exclusion guidance.

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