Skip to main content
Glama

add_route

Adds a route to the MikroTik routing table by specifying a destination CIDR and gateway, with optional routing table, distance, and gateway checks.

Instructions

Adds a route to the routing table.

Notes: dst_address: CIDR e.g. "0.0.0.0/0", "192.168.1.0/24" routing_table: name of a table from /routing table, e.g. "via_ISP2"; defaults to "main". RouterOS 6 called this the routing mark. check_gateway: "ping" or "arp" distance: 1-255 (lower = higher priority)

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": {
      "dst_address": "<dst_address>",
      "gateway": "<gateway>"
    },
    "name": "add_route"
  }
}

Input Schema

NameRequiredDescriptionDefault
scopeNo
deviceNo
commentNo
gatewayYes
disabledNo
distanceNo
pref_srcNo
dst_addressYes
target_scopeNo
check_gatewayNo
routing_tableNo
vrf_interfaceNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.19.4
    • removedInput schema / properties / routing_mark
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "title": "Routing Mark"
      -}
    • addedInput schema / properties / routing_table
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Routing Table"
      +}
  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/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=false and openWorldHint=false, so the safety profile is covered. The description adds useful behavioral context beyond that — the routing_table default of "main", the RouterOS 6 routing-mark equivalence, and distance priority ordering (lower = higher priority). It does not address duplicate-route behavior or the required gateway's role, which matters for a non-idempotent mutation.

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 one-line purpose is front-loaded and followed by a tight bulleted note list with no filler sentences. The bullet labels are terse and the indentation is slightly ragged, but nothing is wasted.

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?

An output schema exists, so return values need not be described, and annotations cover the safety profile. For a 12-parameter, non-idempotent network mutation, though, leaving gateway, vrf_interface, pref_src, and target_scope undocumented and offering no sibling routing guidance leaves real gaps an agent would hit at invocation time.

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 coverage is 0% across 12 parameters, so the description must carry the load, yet it documents only four (dst_address, routing_table, check_gateway, distance). The added meaning for those is genuinely valuable — CIDR examples, a concrete table-name example, the 'ping'/'arp' values, and the 1-255 range with priority semantics — but eight parameters, including the required gateway, are left entirely unexplained in both schema and description.

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 — 'Adds a route to the routing table' — which is unambiguous on its own. It does not, however, distinguish this from siblings like add_default_route, add_blackhole_route, or update_route, so an agent must infer that this is the generic route-creation path.

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?

There is no when-to-use guidance at all: no mention of when to prefer this over add_default_route or add_blackhole_route, no prerequisite notes (e.g. gateway reachability), and no statement about what happens if the route already exists. The only implied usage comes from the parameter notes, which describe format rather than 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