Skip to main content
Glama

Manage Routing Rule

manage_routing_rule
DestructiveIdempotent

Add, remove, enable, or disable MikroTik policy routing rules by source, destination, interface, and table, with dry-run preview and conflict detection.

Instructions

Add, remove, enable, or disable a policy routing rule. Idempotent by srcAddress+dstAddress+interface+table composite key; a repeated add with an explicit, different ruleAction is a CONFLICT. Supports dry-run mode.

Input Schema

NameRequiredDescriptionDefault
tableYesRouting table name — part of the composite idempotency key; required for all actions
actionYesAction to perform
dryRunNoPreview changes without applying.
priorityNoUnsupported: RouterOS 7 /routing/rule has no priority (rules apply in list order); add rejects it
routerIdNoRouter ID; omit to use the default router.
interfaceNoIncoming interface to match
dstAddressNoDestination CIDR to match
ruleActionNoRule action, add only: lookup (default; when the table has no route, later rules and main still apply) or lookup-only-in-table (no fallback)
srcAddressNoSource CIDR to match
confirmationTokenNoToken from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.14.1
    • changedInput schema / properties / priority / description
      Previous value: -"Rule priority (0–4294967295)"New value: +"Unsupported: RouterOS 7 /routing/rule has no priority (rules apply in list order); add rejects it"
    • addedInput schema / properties / ruleAction
      Added value: +{
      +  "description": "Rule action, add only: lookup (default; when the table has no route, later rules and main still apply) or lookup-only-in-table (no fallback)",
      +  "enum": [
      +    "lookup",
      +    "lookup-only-in-table"
      +  ],
      +  "type": "string"
      +}
  2. Changed1 schema field changedv1.8.0
    • addedInput schema / properties / confirmationToken
      Added value: +{
      +  "description": "Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action.",
      +  "type": "string"
      +}
  3. Changed3 schema fields changedv1.6.0
    • changedInput schema / properties / dryRun / description
      Previous value: -"Preview changes without applying"New value: +"Preview changes without applying."
    • changedInput schema / properties / routerId / description
      Previous value: -"Target router identifier from the router registry"New value: +"Router ID; omit to use the default router."
    • changedInput schema / required
      Previous value: -[
      -  "routerId",
      -  "action",
      -  "table"
      -]New value: +[
      +  "action",
      +  "table"
      +]
  4. Addedv1.5.0
  5. Removedv1.1.0
  6. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare idempotentHint=true and destructiveHint=true; the description goes further by defining the composite idempotency key (srcAddress+dstAddress+interface+table), the CONFLICT condition, and dry-run support. It does not spell out what remove/disable tear down, but adds genuine context beyond the annotations.

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?

Three tightly packed sentences: actions first, then idempotency/conflict, then dry-run. No filler, and the core purpose is front-loaded.

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

Completeness4/5

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

For a 10-param mutation tool with no output schema but rich annotations, the description covers actions, identity, conflict, and dry-run. It omits the confirmation/approval flow, but the schema's confirmationToken description covers that, so the definition is largely complete.

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?

Schema coverage is 100%, so the baseline is 3, but the description usefully ties four separate parameters together into one composite identity key and clarifies the conflict behavior around ruleAction — relationships the schema only documents piecemeal. That is meaningful added value over the schema fields.

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 specific verbs (add, remove, enable, disable) against a precise resource ('policy routing rule'), which separates it from generic route/firewall/mangle tools. It is clear, though it never explicitly names or contrasts with siblings like manage_route or list_routing_rules.

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 four enumerated actions imply the usage surface, and the idempotency/conflict note hints at add semantics. However, there is no explicit when-to-use-vs-alternative guidance (e.g., when this beats manage_route or list_routing_rules), so usage must be inferred.

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