Skip to main content
Glama

add_route

Add a static route on a MikroTik device by specifying destination and gateway, with optional distance and comment; preview changes first, then confirm to apply.

Instructions

Add a static route (/ip/route add): dst_address and gateway are required, distance (failover priority - lower wins) and comment are optional. Never refuses a duplicate dst_address

  • multiple routes sharing one is the normal failover shape.

RISK: adding/overriding the default route (dst_address="0.0.0.0/0" or "::/0") redirects all outbound traffic through the new gateway. The returned preview's warning field is non-null whenever this is the case - always check it before calling again with confirm=true.

WRITE tool, guarded: blocked entirely unless the server is running with MIKROTIK_ALLOW_WRITE=true. Call with confirm=False (the default) to get a before/after preview (including the warning field) without changing anything; call again with confirm=True to actually apply it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commentNo
confirmNo
gatewayYes
distanceNo
device_nameYes
dst_addressYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.11.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries full burden and delivers: write-tool classification, the server-enforced write guard, the confirm-gated preview/apply pattern, override risk on default routes, the warning field signal, and duplicate-route tolerance.

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-loaded with the operation, followed by risk, followed by write-guard behavior. Sectioned with caps headers. The paragraph form is a bit dense but every sentence carries weight; no filler.

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?

Given an output schema exists (preview shape with warning field is referenced), the description covers what an agent needs to invoke safely. Missing only a brief mention of device_name's purpose. For a mutation tool with zero annotations, this is unusually 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 0%, so the description must compensate. It identifies required params (dst_address, gateway), optional params (distance with semantics of failover priority - lower wins, comment), and the confirm flag behavior. device_name is not explained, preventing a 5.

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?

States a specific verb+resource ('Add a static route') with the underlying command, required fields, and key distinguishing behavior (accepts duplicate dst_address as normal failover). Distinguishes from siblings like set_route_distance, enable_route, remove_route, and add_ipv6_route.

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

Usage Guidelines5/5

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

Explicitly describes the two-step workflow (confirm=False for preview, confirm=True to apply), states the guard condition (MIKROTIK_ALLOW_WRITE=true), and directs the agent to check the preview's warning field before applying. This is a complete when/when-not spec.

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