Skip to main content
Glama

Run a RouterOS command over SSH

mikrotik_exec
Destructive

Execute a single RouterOS command over SSH on a MikroTik router and get its output, with a read-only guard preventing changes.

Instructions

Run a single RouterOS command on a configured router over SSH and return its output. Stateless: each call opens a fresh connection and closes it before returning, so there is no session, working directory or shell state carried between calls — send absolute command paths such as '/system resource print'. Profiles are read-only by default, in which case commands that would change the router are refused before connecting. Use mikrotik_list_profiles to find profile names.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYesRouterOS command, e.g. '/system resource print' or '/ip address print detail'.
profileYesProfile name from mikrotik_list_profiles.
timeoutMsNoOverride the profile's timeout for this call.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
stderrYes
stdoutYes
exitCodeYes
durationMsYes
hostKeyFingerprintNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

The description adds substantial behavioral context beyond the annotations. It discloses statelessness (fresh connection per call, no session state) and the profile-based read-only enforcement that can refuse mutation commands. This complements the destructiveHint=true annotation by explaining the default safe path. No contradiction with annotations; readOnlyHint=false is consistent because profiles may be read-write.

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?

The description is three sentences, each earning its place: purpose, statelessness, and profile guidance. It is front-loaded with the core action and immediately provides essential behavioral constraints. No redundancy or 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?

For a tool with an output schema and moderate complexity, the description is sufficiently complete. It covers the command format, statelessness, profile selection, and the refusal behavior for read-only profiles. Minor gaps (e.g., error handling on SSH failure) are not critical given the output schema likely documents return values.

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. The description adds value by giving a concrete command example ('/system resource print') and emphasizing absolute paths, which clarifies the 'command' parameter. It also ties 'profile' to mikrotik_list_profiles, enriching the schema's minimal description. timeoutMs is adequately covered by the schema; no additional description needed.

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?

The description clearly states the tool's purpose: 'Run a single RouterOS command on a configured router over SSH and return its output.' The verb 'run' and resource 'RouterOS command' are specific, and it differentiates from the only sibling (mikrotik_list_profiles) by focusing on execution rather than listing. The statelessness note further clarifies scope.

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 directs when to use this tool vs the alternative: 'Use mikrotik_list_profiles to find profile names.' It also provides critical usage guidance—'send absolute command paths'—and describes the conditional refusal behavior for read-only profiles, which tells the agent when a command might be rejected.

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