@usex/mikrotik-mcp 4.8.0 → 4.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -106,7 +106,7 @@ import {
106
106
  updateAaaEntity,
107
107
  updateSummaryLine,
108
108
  writeBackup
109
- } from "./shared/cli-s2s6hryh.js";
109
+ } from "./shared/cli-vfm5c52q.js";
110
110
 
111
111
  // src/cli.ts
112
112
  import { existsSync as existsSync2 } from "fs";
package/dist/index.js CHANGED
@@ -29,7 +29,7 @@ import {
29
29
  selectToolModules,
30
30
  setConfig,
31
31
  updateSummaryLine
32
- } from "./shared/library-wm3vc8kq.js";
32
+ } from "./shared/library-vpg7d53z.js";
33
33
  // src/server.ts
34
34
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
35
35
  import { ListToolsRequestSchema } from "@modelcontextprotocol/sdk/types.js";
@@ -4,7 +4,7 @@ import {
4
4
  allToolModules,
5
5
  moduleCatalog,
6
6
  selectToolModules
7
- } from "./cli-s2s6hryh.js";
7
+ } from "./cli-vfm5c52q.js";
8
8
  export {
9
9
  selectToolModules,
10
10
  moduleCatalog,
@@ -8497,7 +8497,7 @@ var cache = null;
8497
8497
  async function gateway() {
8498
8498
  if (cache)
8499
8499
  return cache;
8500
- const { moduleCatalog } = await import("./cli-xfa5x65h.js");
8500
+ const { moduleCatalog } = await import("./cli-56bsncg6.js");
8501
8501
  const forIndex = [];
8502
8502
  const byName = new Map;
8503
8503
  for (const mod of moduleCatalog) {
@@ -19862,18 +19862,17 @@ var speedTestTools = [
19862
19862
  name: "speed_test",
19863
19863
  title: "Run RouterOS Speed Test",
19864
19864
  annotations: READ,
19865
- description: "Runs a bandwidth and latency speed test from the router to a target RouterOS device " + "(`/tool speed-test`) \u2014 measures TCP throughput and round-trip latency between two " + "MikroTik/RouterOS nodes. The target `address` must be a reachable RouterOS device " + "running the bandwidth-test server; this is NOT a general ICMP ping/traceroute (for " + "that use the ping or traceroute tools). The test runs for `duration` seconds then " + "terminates rather than streaming. `direction` controls traffic flow: 'receive' (router " + "pulls data from the target), 'transmit' (router pushes data to the target), or 'both' " + "(default). `tcp_connection_count` sets the number of parallel TCP streams. Optional " + "`user`/`password` authenticate to the remote bandwidth-test server. Returns measured " + "throughput (tx/rx Mbps) and latency figures.",
19865
+ description: "Runs a bandwidth and latency speed test from the router to a target RouterOS device " + "(`/tool speed-test`) \u2014 measures ping, jitter, and TCP/UDP throughput between two " + "MikroTik/RouterOS nodes. The target `address` must be a reachable RouterOS device; " + "this is NOT a general ICMP ping/traceroute (for that use the ping or traceroute tools). " + "The tool automatically runs both directions (receive and transmit) \u2014 there is no " + "direction selector on `/tool speed-test`. Each sub-test runs for `duration` seconds " + "(the tool runs ping + TCP recv/send + UDP recv/send, so total wall time is a few times " + "this). `connection_count` sets the number of parallel streams (default 20, or the core " + "count if higher). Optional `user`/`password` authenticate to the remote device. Returns " + "measured throughput and latency figures.",
19866
19866
  inputSchema: {
19867
19867
  address: z72.string().describe("Target RouterOS device address"),
19868
- duration: z72.number().int().min(1).default(10).describe("Test duration in seconds (bounds the run)"),
19869
- direction: z72.enum(["receive", "transmit", "both"]).default("both"),
19870
- tcp_connection_count: z72.number().int().min(1).optional().describe("Parallel TCP connections to use"),
19868
+ duration: z72.number().int().min(1).default(10).describe("Per-test duration in seconds (maps to RouterOS `test-duration`)"),
19869
+ connection_count: z72.number().int().min(1).optional().describe("Parallel connections to use (RouterOS `connection-count`, default 20)"),
19871
19870
  user: z72.string().optional().describe("Username for the target device"),
19872
19871
  password: z72.string().optional().describe("Password for the target device")
19873
19872
  },
19874
19873
  async handler(a, ctx) {
19875
- ctx.info(`Speed test to ${a.address} (duration=${a.duration}s, direction=${a.direction})`);
19876
- const cmd = new Cmd(`/tool speed-test address=${a.address}`).set("duration", `${a.duration}s`).set("direction", a.direction).opt("tcp-connection-count", a.tcp_connection_count).opt("user", a.user).opt("password", a.password).build();
19874
+ ctx.info(`Speed test to ${a.address} (test-duration=${a.duration}s)`);
19875
+ const cmd = new Cmd(`/tool speed-test address=${a.address}`).set("test-duration", `${a.duration}s`).opt("connection-count", a.connection_count).opt("user", a.user).opt("password", a.password).build();
19877
19876
  const result = flattenLiveOutput(await executeMikrotikCommand(cmd, ctx, { maxMs: a.duration * 1000 + 15000 }));
19878
19877
  if (looksLikeError(result))
19879
19878
  return `Failed to run speed test to ${a.address}: ${result}`;
@@ -4,7 +4,7 @@ import {
4
4
  allToolModules,
5
5
  moduleCatalog,
6
6
  selectToolModules
7
- } from "./library-wm3vc8kq.js";
7
+ } from "./library-vpg7d53z.js";
8
8
  export {
9
9
  selectToolModules,
10
10
  moduleCatalog,
@@ -8306,7 +8306,7 @@ var cache = null;
8306
8306
  async function gateway() {
8307
8307
  if (cache)
8308
8308
  return cache;
8309
- const { moduleCatalog } = await import("./library-6zh75zhp.js");
8309
+ const { moduleCatalog } = await import("./library-1775m2yr.js");
8310
8310
  const forIndex = [];
8311
8311
  const byName = new Map;
8312
8312
  for (const mod of moduleCatalog) {
@@ -19671,18 +19671,17 @@ var speedTestTools = [
19671
19671
  name: "speed_test",
19672
19672
  title: "Run RouterOS Speed Test",
19673
19673
  annotations: READ,
19674
- description: "Runs a bandwidth and latency speed test from the router to a target RouterOS device " + "(`/tool speed-test`) \u2014 measures TCP throughput and round-trip latency between two " + "MikroTik/RouterOS nodes. The target `address` must be a reachable RouterOS device " + "running the bandwidth-test server; this is NOT a general ICMP ping/traceroute (for " + "that use the ping or traceroute tools). The test runs for `duration` seconds then " + "terminates rather than streaming. `direction` controls traffic flow: 'receive' (router " + "pulls data from the target), 'transmit' (router pushes data to the target), or 'both' " + "(default). `tcp_connection_count` sets the number of parallel TCP streams. Optional " + "`user`/`password` authenticate to the remote bandwidth-test server. Returns measured " + "throughput (tx/rx Mbps) and latency figures.",
19674
+ description: "Runs a bandwidth and latency speed test from the router to a target RouterOS device " + "(`/tool speed-test`) \u2014 measures ping, jitter, and TCP/UDP throughput between two " + "MikroTik/RouterOS nodes. The target `address` must be a reachable RouterOS device; " + "this is NOT a general ICMP ping/traceroute (for that use the ping or traceroute tools). " + "The tool automatically runs both directions (receive and transmit) \u2014 there is no " + "direction selector on `/tool speed-test`. Each sub-test runs for `duration` seconds " + "(the tool runs ping + TCP recv/send + UDP recv/send, so total wall time is a few times " + "this). `connection_count` sets the number of parallel streams (default 20, or the core " + "count if higher). Optional `user`/`password` authenticate to the remote device. Returns " + "measured throughput and latency figures.",
19675
19675
  inputSchema: {
19676
19676
  address: z72.string().describe("Target RouterOS device address"),
19677
- duration: z72.number().int().min(1).default(10).describe("Test duration in seconds (bounds the run)"),
19678
- direction: z72.enum(["receive", "transmit", "both"]).default("both"),
19679
- tcp_connection_count: z72.number().int().min(1).optional().describe("Parallel TCP connections to use"),
19677
+ duration: z72.number().int().min(1).default(10).describe("Per-test duration in seconds (maps to RouterOS `test-duration`)"),
19678
+ connection_count: z72.number().int().min(1).optional().describe("Parallel connections to use (RouterOS `connection-count`, default 20)"),
19680
19679
  user: z72.string().optional().describe("Username for the target device"),
19681
19680
  password: z72.string().optional().describe("Password for the target device")
19682
19681
  },
19683
19682
  async handler(a, ctx) {
19684
- ctx.info(`Speed test to ${a.address} (duration=${a.duration}s, direction=${a.direction})`);
19685
- const cmd = new Cmd(`/tool speed-test address=${a.address}`).set("duration", `${a.duration}s`).set("direction", a.direction).opt("tcp-connection-count", a.tcp_connection_count).opt("user", a.user).opt("password", a.password).build();
19683
+ ctx.info(`Speed test to ${a.address} (test-duration=${a.duration}s)`);
19684
+ const cmd = new Cmd(`/tool speed-test address=${a.address}`).set("test-duration", `${a.duration}s`).opt("connection-count", a.connection_count).opt("user", a.user).opt("password", a.password).build();
19686
19685
  const result = flattenLiveOutput(await executeMikrotikCommand(cmd, ctx, { maxMs: a.duration * 1000 + 15000 }));
19687
19686
  if (looksLikeError(result))
19688
19687
  return `Failed to run speed test to ${a.address}: ${result}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usex/mikrotik-mcp",
3
- "version": "4.8.0",
3
+ "version": "4.10.0",
4
4
  "description": "MCP server for MikroTik RouterOS — 780+ tools over SSH for firewall, NAT, routing, DHCP, DNS, WireGuard, wireless, QoS and more.",
5
5
  "keywords": [
6
6
  "ai",
@@ -0,0 +1,203 @@
1
+ ---
2
+ name: setup-v2ray-container-proxy
3
+ title: Run V2Ray/Xray (VLESS·Reality·VMess·Trojan·Shadowsocks) in a MikroTik container and route traffic through it
4
+ description: Deploy an Xray / V2Ray / sing-box client inside a RouterOS /container, wire its VETH into the router, and selectively (or fully) route LAN traffic through the encrypted VLESS-Reality / VMess / Trojan / Shadowsocks / Hysteria tunnel — with device-mode, disk, MTU, DNS-leak and kill-switch handling. For lawful privacy / censorship circumvention on networks you are authorized to use.
5
+ arguments:
6
+ - name: device
7
+ description: Which configured MikroTik to run the proxy container on (config key or label from list_mikrotik_devices). Omit to discover and choose.
8
+ required: false
9
+ - name: protocol
10
+ description: V2Ray-family protocol the tunnel will use — vless-reality (recommended), vless-vision, vmess, trojan, shadowsocks, or (sing-box) hysteria2/tuic. This is configured INSIDE the container image, not on RouterOS.
11
+ required: false
12
+ - name: image
13
+ description: Container image to run (e.g. gritsenko/xray-mikrotik:latest, or a sing-box image). Omit to let you recommend one matching the device architecture and chosen protocol.
14
+ required: false
15
+ - name: scope
16
+ description: What to route through the tunnel — "selective" (only domains/IPs on an address-list, default and recommended) or "all" (default route via the tunnel, with a kill-switch).
17
+ required: false
18
+ ---
19
+
20
+ You are deploying a **V2Ray / Xray-core (or sing-box) client inside a MikroTik
21
+ RouterOS `/container`** and routing LAN traffic through its encrypted tunnel. This
22
+ is the _native-RouterOS_ way to run the modern censorship-resistant protocols —
23
+ **VLESS (+Vision/XTLS), VLESS + Reality, VMess, Trojan, Shadowsocks**, and (with a
24
+ sing-box image) **Hysteria2 / TUIC** — that RouterOS has no built-in support for.
25
+ The router runs the client; a remote V2Ray/Xray **server (a VPS you control)** is
26
+ the other end. This flow configures the RouterOS side; the tunnel's crypto
27
+ parameters live in the container image's config/env.
28
+
29
+ **Legality & scope.** This is for **lawful privacy and accessibility** on networks
30
+ and services you are authorized to use — comply with local law and provider terms.
31
+ Confirm the user understands this before proceeding. Treat the remote server
32
+ address, UUIDs, keys and short-ids as **secrets** — never log or echo them back in
33
+ full; mask them in your reports.
34
+
35
+ Target device: {{device}}
36
+ Protocol: {{protocol}}
37
+ Image: {{image}}
38
+ Routing scope: {{scope}}
39
+
40
+ ---
41
+
42
+ ## 0. Discover the device and confirm it CAN run containers (do this FIRST)
43
+
44
+ - Call `list_mikrotik_devices`; resolve `{{device}}` (never substitute a similar
45
+ name). If omitted, present the inventory and ask which router. Pass `device=` on
46
+ every subsequent call.
47
+ - **Prerequisite check (read-only)** — containers have hard requirements; verify all
48
+ before proposing changes:
49
+ - `get_system_resources` (`device=<name>`) — confirm **architecture** is `arm`,
50
+ `arm64`, or `x86` (**MIPS/SMIPS cannot run containers** — stop and say so), and
51
+ that there is spare **RAM/CPU**.
52
+ - `list_containers` — if it errors, the **`container` package isn't installed**.
53
+ - Confirm an **external disk** (USB/NVMe, ext4) exists for the container root-dir —
54
+ running container images off internal flash wears it out fast. Check with
55
+ `run_routeros_command` `/disk print`.
56
+ - **Two prerequisites need out-of-band action — flag, do NOT silently attempt:**
57
+ 1. **device-mode = container=yes.** Enabling it (`/system/device-mode/update
58
+ mode=advanced container=yes`) requires **physical confirmation** (press the
59
+ reset button or power-cycle within the timeout). You cannot complete this
60
+ remotely — tell the user they must do the physical step.
61
+ 2. **Installing the `container` package** requires uploading the `.npk` and
62
+ `/system/package/apply-changes` (7.18+) which **reboots** the router. Get
63
+ explicit approval; note the device will drop offline during reboot.
64
+
65
+ Do not proceed to container creation until architecture, disk, package, and
66
+ device-mode are all satisfied.
67
+
68
+ ## 1. Choose image and protocol
69
+
70
+ - **Protocol** (`{{protocol}}`): recommend **VLESS + Reality** as the default —
71
+ Reality forges the TLS handshake of a real public site (no certificate to obtain,
72
+ no domain to burn, strongest anti-DPI of the family). VLESS+Vision/XTLS, VMess,
73
+ Trojan, and Shadowsocks are alternatives; sing-box images add Hysteria2/TUIC
74
+ (QUIC-based, good on lossy/throttled links). The choice is realised in the
75
+ container's config — RouterOS just carries the encapsulated traffic.
76
+ - **Image** (`{{image}}`): pick one matching the device architecture (map:
77
+ `arm→linux/arm/v7`, `arm64→linux/arm64`, `x86→linux/amd64`). Community images
78
+ (e.g. `gritsenko/xray-mikrotik`) bundle **xray-core + tun2socks** so the
79
+ container's VETH acts directly as a routable gateway — simplest. Otherwise the
80
+ **two-container** pattern (below) is the general form. **Read the specific image's
81
+ README for its exact env-var names** — they differ per image; do not assume.
82
+ - **RouterOS local-import caveat:** `add_container remote_image=` pulls from a
83
+ registry (needs `set_container_config registry-url=... tmpdir=disk1/pull` and
84
+ internet). A local `.tar` must be **single-layer, uncompressed, Docker-v1** — most
85
+ people pull from a registry.
86
+
87
+ ## 2. Two deployment shapes (pick one, explain to the user)
88
+
89
+ **A — All-in-one image (recommended, simplest).** One container running xray-core +
90
+ tun2socks. Its VETH IP becomes the gateway you route through. Example env schema
91
+ (gritsenko/xray-mikrotik — verify against the image):
92
+ `SERVER_ADDRESS`, `SERVER_PORT`, `USER_ID`, `ENCRYPTION`, `FINGERPRINT_FP`,
93
+ `SERVER_NAME_SNI`, `PUBLIC_KEY_PBK`, `SHORT_ID_SID`.
94
+
95
+ **B — Two-container (general, more control).** Container 1 = xray-core exposing a
96
+ **SOCKS5** inbound (e.g. `172.17.0.2:1080`); Container 2 = **tun2socks /
97
+ hev-socks5-tunnel** turning that SOCKS5 into a routable gateway on its own VETH.
98
+ Typical env — xray: `REMOTE_ADDRESS,REMOTE_PORT,ID,FLOW,PUBLIC_KEY,SHORT_ID,
99
+ SERVER_NAME`; tun: `SOCKS5_ADDR=172.17.0.2,SOCKS5_PORT=1080,LOCAL_ROUTE` (so LAN
100
+ subnets return via the router, not the tunnel). _Note: original tun2socks has arm64
101
+ issues — use an arm64-built image._
102
+
103
+ ## 3. Container networking (VETH + NAT + DNS)
104
+
105
+ There is **no dedicated VETH tool** — create it with `run_routeros_command`
106
+ (approve each raw command). Example for shape A on a /30:
107
+
108
+ - `/interface veth add name=veth-xray address=172.18.20.6/30 gateway=172.18.20.5`
109
+ - `add_ip_address` `address=172.18.20.5/30 interface=veth-xray` (router side).
110
+ - `create_nat_rule` `chain=srcnat action=masquerade out-interface=veth-xray` (so the
111
+ container reaches the internet / the remote server).
112
+ - Container `dns` = the router's veth IP (`172.18.20.5`) or a resolver you trust.
113
+ (Shape B: put both VETHs on a `containers` bridge, `172.17.0.1/24` gateway.)
114
+
115
+ ## 4. Create and start the container
116
+
117
+ - If pulling from a registry: `set_container_config` `registry-url=https://registry-1.docker.io tmpdir=disk1/pull`.
118
+ - Env vars: either inline via `add_container` `env="SERVER_ADDRESS=...,USER_ID=..."`
119
+ (7.21+) or as a named list with `add_container_env` (`envlists=`). **Mask the
120
+ secret values in anything you print back.**
121
+ - `add_container` (`device=<name>`) — `remote_image={{image}}`, `interface=veth-xray`,
122
+ `root_dir=disk1/xray`, `dns=172.18.20.5`, `logging=yes`, `start_on_boot=yes`,
123
+ `hostname=xray`, and the env.
124
+ - `start_container`; then `get_container` / `list_containers` until it shows
125
+ **running**, and read startup output with the container-log (it must show a
126
+ successful outbound handshake to your server before routing anything through it).
127
+
128
+ ## 5. Route traffic through the tunnel
129
+
130
+ **Selective (`scope=selective`, recommended)** — only chosen destinations go through
131
+ the proxy; everything else uses the normal WAN (fast, low-risk, defeats geo-blocks
132
+ for the sites that need it):
133
+
134
+ 1. `add_address_list_entry` — build a list `via_proxy` of the domains/IPs to tunnel
135
+ (RouterOS resolves domain entries to IPs automatically).
136
+ 2. `add_routing_table` — `name=proxy fib`.
137
+ 3. `create_mangle_rule` — `chain=prerouting action=mark-routing
138
+ new-routing-mark=proxy dst-address-list=via_proxy passthrough=no`
139
+ (add `src-address=<LAN>` to scope to LAN clients; exclude the router's own/ the
140
+ container subnet to avoid loops).
141
+ 4. `add_route` — `dst-address=0.0.0.0/0 gateway=172.18.20.6 routing-table=proxy`
142
+ (gateway = the container's VETH IP, shape A; the tun container's IP, shape B).
143
+
144
+ **All traffic (`scope=all`)** — default route via the tunnel. Same routing table but
145
+ mark all LAN traffic (or set the container gateway as the main default). **Mandatory
146
+ kill-switch:** add a low-priority `forward` **drop** for the LAN when the tunnel
147
+ interface is down, so a container crash can't silently leak traffic out the clear
148
+ WAN. Also pin a **higher-priority route to the remote server's IP via the real WAN**
149
+ so the tunnel's own packets don't recurse into itself.
150
+
151
+ ## 6. DNS-leak & MTU handling
152
+
153
+ - **DNS leaks:** if clients query a public resolver directly, the destination is
154
+ exposed even though the payload is tunnelled. Redirect LAN DNS (dst-nat UDP/TCP 53
155
+ to the router or the container's resolver) so lookups for proxied domains resolve
156
+ through the tunnel, or run the resolver inside/behind the container.
157
+ - **MTU/MSS:** encapsulation shrinks usable MTU — add a `create_mangle_rule`
158
+ `chain=forward action=change-mss new-mss=clamp-to-pmtu tcp-flags=syn` (and/or lower
159
+ the veth MTU). This is the #1 "handshake works, big pages hang" cause.
160
+
161
+ ## 7. Firewall — safely
162
+
163
+ Under Safe Mode (`enable_safe_mode` `device=<name>` → edits → verify →
164
+ `commit_safe_mode`): allow the container subnet outbound, keep the masquerade from
165
+ step 3, and (scope=all) install the kill-switch drop. Do not expose the container's
166
+ SOCKS5 port to the WAN.
167
+
168
+ ## 8. Verify end to end
169
+
170
+ - `get_container` shows **running**; the container log shows a completed handshake to
171
+ your server (no repeated dial errors).
172
+ - From a **marked** LAN source, check the **egress IP** changed: fetch an "what is my
173
+ IP" service from a proxied client (or `run_routeros_command` a `/tool fetch` bound
174
+ to the proxy path) — it should show the **VPS** IP, not the local WAN IP.
175
+ - Confirm a **non-proxied** destination still exits the normal WAN (selective scope).
176
+ - `ping`/`traceroute` a proxied target; test a large HTTPS page (MTU sanity).
177
+ - Reboot-persistence: `start_on_boot=yes` and the routing rules survive a reboot.
178
+
179
+ ## 9. Family notes, hardening & honest caveats
180
+
181
+ - **VLESS + Reality**: no cert/domain needed; set a believable `SERVER_NAME_SNI`
182
+ (a real, unrelated HTTPS site the censor won't block) and matching public-key/
183
+ short-id from the server. Strongest default against active-probing DPI.
184
+ - **VMess/Trojan/Shadowsocks**: pair with TLS/WebSocket/gRPC transports on 443 for
185
+ camouflage; plain Shadowsocks is weaker against modern DPI.
186
+ - **Hysteria2/TUIC** (sing-box image): QUIC/UDP — great on lossy or throttled links,
187
+ but blocked where UDP is throttled.
188
+ - **Trust**: you are running a third-party image with your keys and all your traffic.
189
+ Prefer images you can inspect/build; pin a digest; keep it updated.
190
+ - **Reality/DPI is an arms race** — never present it as a guarantee. Keep a fallback
191
+ (a second protocol/port, or an SSTP/OpenVPN-443 transport per
192
+ `setup-sstp-tunnel-between-sites`).
193
+ - **Resource reality**: containers are RAM/CPU/disk heavy on small routers; on very
194
+ low-end boards run the client on a VPS/box and point the router at it instead.
195
+
196
+ ---
197
+
198
+ Report: device, architecture, image + protocol, VETH/NAT, container status, the
199
+ routing-table + mangle + route rules and the address-list scope, DNS/MTU/kill-switch
200
+ handling, and the verification results (egress-IP proof) — with **all secrets
201
+ masked**, and a note of every `run_routeros_command` step used (VETH, device-mode).
202
+ Flag the physical device-mode step and any reboot explicitly. Never apply changes the
203
+ user hasn't approved.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "version": "4.8.0",
3
+ "version": "4.10.0",
4
4
  "generated": "by scripts/gen-schemas.ts — do not edit by hand",
5
5
  "toolCount": 819,
6
6
  "tools": [
@@ -26785,7 +26785,7 @@
26785
26785
  "idempotentHint": true,
26786
26786
  "openWorldHint": false
26787
26787
  },
26788
- "description": "Runs a bandwidth and latency speed test from the router to a target RouterOS device (`/tool speed-test`) — measures TCP throughput and round-trip latency between two MikroTik/RouterOS nodes. The target `address` must be a reachable RouterOS device running the bandwidth-test server; this is NOT a general ICMP ping/traceroute (for that use the ping or traceroute tools). The test runs for `duration` seconds then terminates rather than streaming. `direction` controls traffic flow: 'receive' (router pulls data from the target), 'transmit' (router pushes data to the target), or 'both' (default). `tcp_connection_count` sets the number of parallel TCP streams. Optional `user`/`password` authenticate to the remote bandwidth-test server. Returns measured throughput (tx/rx Mbps) and latency figures.",
26788
+ "description": "Runs a bandwidth and latency speed test from the router to a target RouterOS device (`/tool speed-test`) — measures ping, jitter, and TCP/UDP throughput between two MikroTik/RouterOS nodes. The target `address` must be a reachable RouterOS device; this is NOT a general ICMP ping/traceroute (for that use the ping or traceroute tools). The tool automatically runs both directions (receive and transmit) there is no direction selector on `/tool speed-test`. Each sub-test runs for `duration` seconds (the tool runs ping + TCP recv/send + UDP recv/send, so total wall time is a few times this). `connection_count` sets the number of parallel streams (default 20, or the core count if higher). Optional `user`/`password` authenticate to the remote device. Returns measured throughput and latency figures.",
26789
26789
  "inputSchema": {
26790
26790
  "$schema": "https://json-schema.org/draft/2020-12/schema",
26791
26791
  "type": "object",
@@ -26796,22 +26796,13 @@
26796
26796
  },
26797
26797
  "duration": {
26798
26798
  "default": 10,
26799
- "description": "Test duration in seconds (bounds the run)",
26799
+ "description": "Per-test duration in seconds (maps to RouterOS `test-duration`)",
26800
26800
  "type": "integer",
26801
26801
  "minimum": 1,
26802
26802
  "maximum": 9007199254740991
26803
26803
  },
26804
- "direction": {
26805
- "default": "both",
26806
- "type": "string",
26807
- "enum": [
26808
- "receive",
26809
- "transmit",
26810
- "both"
26811
- ]
26812
- },
26813
- "tcp_connection_count": {
26814
- "description": "Parallel TCP connections to use",
26804
+ "connection_count": {
26805
+ "description": "Parallel connections to use (RouterOS `connection-count`, default 20)",
26815
26806
  "type": "integer",
26816
26807
  "minimum": 1,
26817
26808
  "maximum": 9007199254740991
@@ -26827,8 +26818,7 @@
26827
26818
  },
26828
26819
  "required": [
26829
26820
  "address",
26830
- "duration",
26831
- "direction"
26821
+ "duration"
26832
26822
  ],
26833
26823
  "additionalProperties": false
26834
26824
  }
@@ -9,22 +9,13 @@
9
9
  },
10
10
  "duration": {
11
11
  "default": 10,
12
- "description": "Test duration in seconds (bounds the run)",
12
+ "description": "Per-test duration in seconds (maps to RouterOS `test-duration`)",
13
13
  "type": "integer",
14
14
  "minimum": 1,
15
15
  "maximum": 9007199254740991
16
16
  },
17
- "direction": {
18
- "default": "both",
19
- "type": "string",
20
- "enum": [
21
- "receive",
22
- "transmit",
23
- "both"
24
- ]
25
- },
26
- "tcp_connection_count": {
27
- "description": "Parallel TCP connections to use",
17
+ "connection_count": {
18
+ "description": "Parallel connections to use (RouterOS `connection-count`, default 20)",
28
19
  "type": "integer",
29
20
  "minimum": 1,
30
21
  "maximum": 9007199254740991
@@ -40,8 +31,7 @@
40
31
  },
41
32
  "required": [
42
33
  "address",
43
- "duration",
44
- "direction"
34
+ "duration"
45
35
  ],
46
36
  "additionalProperties": false
47
37
  }