@usex/mikrotik-mcp 4.9.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 +1 -1
- package/dist/index.js +1 -1
- package/dist/shared/{cli-xfa5x65h.js → cli-56bsncg6.js} +1 -1
- package/dist/shared/{cli-s2s6hryh.js → cli-vfm5c52q.js} +6 -7
- package/dist/shared/{library-6zh75zhp.js → library-1775m2yr.js} +1 -1
- package/dist/shared/{library-wm3vc8kq.js → library-vpg7d53z.js} +6 -7
- package/package.json +1 -1
- package/schemas/tool-catalog.json +6 -16
- package/schemas/tools/speed_test.json +4 -14
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
selectToolModules,
|
|
30
30
|
setConfig,
|
|
31
31
|
updateSummaryLine
|
|
32
|
-
} from "./shared/library-
|
|
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";
|
|
@@ -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-
|
|
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
|
|
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("
|
|
19869
|
-
|
|
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
|
|
19876
|
-
const cmd = new Cmd(`/tool speed-test address=${a.address}`).set("duration", `${a.duration}s`).
|
|
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}`;
|
|
@@ -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-
|
|
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
|
|
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("
|
|
19678
|
-
|
|
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
|
|
19685
|
-
const cmd = new Cmd(`/tool speed-test address=${a.address}`).set("duration", `${a.duration}s`).
|
|
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
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"version": "4.
|
|
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
|
|
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": "
|
|
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
|
-
"
|
|
26805
|
-
"
|
|
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": "
|
|
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
|
-
"
|
|
18
|
-
"
|
|
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
|
}
|