@usex/mikrotik-mcp 3.57.0 → 3.58.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 +54 -62
- package/dist/index.js +21 -15
- package/dist/shared/{cli-thhk9f7n.js → cli-r5p22dag.js} +825 -595
- package/dist/shared/{cli-0ctwspf1.js → cli-zq0rg72c.js} +1 -1
- package/dist/shared/{library-jve65pzw.js → library-41tn0b6b.js} +1 -1
- package/dist/shared/{library-ymtf9zyk.js → library-84jwmz7a.js} +824 -595
- package/dist/ui/connected-devices.html +1 -1
- package/dist/ui/dashboard.html +1 -1
- package/dist/ui/interfaces.html +1 -1
- package/dist/ui/records.html +1 -1
- package/package.json +1 -1
|
@@ -386,7 +386,8 @@ var MikrotikConfigSchema = z.object({
|
|
|
386
386
|
readOnly: z.boolean().default(false),
|
|
387
387
|
tools: ToolFilterSchema.default(() => ToolFilterSchema.parse({})),
|
|
388
388
|
memory: MemoryConfigSchema.default(() => MemoryConfigSchema.parse({})),
|
|
389
|
-
backupDir: z.string().optional()
|
|
389
|
+
backupDir: z.string().optional(),
|
|
390
|
+
disableUpdateCheck: z.boolean().default(false)
|
|
390
391
|
});
|
|
391
392
|
function env(...names) {
|
|
392
393
|
for (const n of names) {
|
|
@@ -525,6 +526,7 @@ function loadConfig(argv = process.argv.slice(2)) {
|
|
|
525
526
|
};
|
|
526
527
|
const isTruthy = (v) => /^(1|true|yes|on)$/i.test(v ?? "");
|
|
527
528
|
const readOnly = isTruthy(pick("read-only", "MIKROTIK_READ_ONLY"));
|
|
529
|
+
const disableUpdateCheck = isTruthy(pick("disable-update-check", "MIKROTIK_DISABLE_UPDATE_CHECK"));
|
|
528
530
|
const csv = (v) => v === undefined ? undefined : v.split(",").map((s) => s.trim()).filter(Boolean);
|
|
529
531
|
const tools = {
|
|
530
532
|
enabledModules: csv(pick("tools-enabled-modules", "MIKROTIK_TOOLS__ENABLED_MODULES")),
|
|
@@ -564,6 +566,7 @@ function loadConfig(argv = process.argv.slice(2)) {
|
|
|
564
566
|
mcp,
|
|
565
567
|
dashboard,
|
|
566
568
|
readOnly,
|
|
569
|
+
disableUpdateCheck,
|
|
567
570
|
tools,
|
|
568
571
|
ssh,
|
|
569
572
|
memory,
|
|
@@ -8327,7 +8330,7 @@ var cache = null;
|
|
|
8327
8330
|
async function gateway() {
|
|
8328
8331
|
if (cache)
|
|
8329
8332
|
return cache;
|
|
8330
|
-
const { moduleCatalog } = await import("./cli-
|
|
8333
|
+
const { moduleCatalog } = await import("./cli-zq0rg72c.js");
|
|
8331
8334
|
const forIndex = [];
|
|
8332
8335
|
const byName = new Map;
|
|
8333
8336
|
for (const mod of moduleCatalog) {
|
|
@@ -24845,8 +24848,228 @@ ${result}`;
|
|
|
24845
24848
|
})
|
|
24846
24849
|
];
|
|
24847
24850
|
|
|
24848
|
-
// src/tools/
|
|
24851
|
+
// src/tools/server-pulse.ts
|
|
24849
24852
|
import { z as z104 } from "zod";
|
|
24853
|
+
|
|
24854
|
+
// src/core/update-check.ts
|
|
24855
|
+
import { existsSync as existsSync3, mkdirSync as mkdirSync4, readFileSync as readFileSync6, writeFileSync as writeFileSync2 } from "fs";
|
|
24856
|
+
import { homedir as homedir2 } from "os";
|
|
24857
|
+
import { dirname as dirname4, join as join6 } from "path";
|
|
24858
|
+
|
|
24859
|
+
// src/version.ts
|
|
24860
|
+
import { readFileSync as readFileSync5 } from "fs";
|
|
24861
|
+
import { join as join5 } from "path";
|
|
24862
|
+
var pkg = JSON.parse(readFileSync5(join5(PROJECT_ROOT, "package.json"), "utf-8"));
|
|
24863
|
+
var VERSION = pkg.version ?? "0.0.0";
|
|
24864
|
+
var WEBSITE_URL = pkg.homepage ?? "";
|
|
24865
|
+
var LOGO_URL = pkg.logoIcon ?? "";
|
|
24866
|
+
var SERVER_TITLE = "MikroTik MCP";
|
|
24867
|
+
var SERVER_DESCRIPTION = pkg.description ?? "";
|
|
24868
|
+
var SERVER_NAME = "mikrotik-mcp";
|
|
24869
|
+
var PKG_META = pkg;
|
|
24870
|
+
|
|
24871
|
+
// src/core/update-check.ts
|
|
24872
|
+
var GITHUB_API = "https://api.github.com/repos/ali-master/mikrotik-mcp/releases/latest";
|
|
24873
|
+
var MEMORY_CACHE_TTL = 15 * 60 * 1000;
|
|
24874
|
+
var FILE_CACHE_TTL = 6 * 60 * 60 * 1000;
|
|
24875
|
+
var CACHE_PATH = join6(homedir2(), ".mikrotik-mcp", "update-check.json");
|
|
24876
|
+
function compareVersions(a, b) {
|
|
24877
|
+
const pa = a.replace(/^v/, "").split(".").map(Number);
|
|
24878
|
+
const pb = b.replace(/^v/, "").split(".").map(Number);
|
|
24879
|
+
for (let i = 0;i < Math.max(pa.length, pb.length); i++) {
|
|
24880
|
+
const diff = (pa[i] ?? 0) - (pb[i] ?? 0);
|
|
24881
|
+
if (diff !== 0)
|
|
24882
|
+
return diff;
|
|
24883
|
+
}
|
|
24884
|
+
return 0;
|
|
24885
|
+
}
|
|
24886
|
+
var memoryCache = null;
|
|
24887
|
+
function loadFileCache(maxAge = FILE_CACHE_TTL) {
|
|
24888
|
+
try {
|
|
24889
|
+
const raw = readFileSync6(CACHE_PATH, "utf-8");
|
|
24890
|
+
const parsed = JSON.parse(raw);
|
|
24891
|
+
if (!parsed?.data?.version || typeof parsed.fetchedAt !== "number")
|
|
24892
|
+
return null;
|
|
24893
|
+
if (Date.now() - parsed.fetchedAt > maxAge)
|
|
24894
|
+
return null;
|
|
24895
|
+
return parsed.data;
|
|
24896
|
+
} catch {
|
|
24897
|
+
return null;
|
|
24898
|
+
}
|
|
24899
|
+
}
|
|
24900
|
+
function loadFileCacheSync() {
|
|
24901
|
+
return loadFileCache();
|
|
24902
|
+
}
|
|
24903
|
+
function saveFileCache(data) {
|
|
24904
|
+
try {
|
|
24905
|
+
const dir = dirname4(CACHE_PATH);
|
|
24906
|
+
if (!existsSync3(dir))
|
|
24907
|
+
mkdirSync4(dir, { recursive: true });
|
|
24908
|
+
writeFileSync2(CACHE_PATH, JSON.stringify({ data, fetchedAt: Date.now() }));
|
|
24909
|
+
} catch {}
|
|
24910
|
+
}
|
|
24911
|
+
async function fetchLatestRelease() {
|
|
24912
|
+
if (memoryCache && Date.now() - memoryCache.fetchedAt < MEMORY_CACHE_TTL) {
|
|
24913
|
+
return memoryCache.data;
|
|
24914
|
+
}
|
|
24915
|
+
const fileCached = loadFileCache();
|
|
24916
|
+
if (fileCached) {
|
|
24917
|
+
memoryCache = { data: fileCached, fetchedAt: Date.now() };
|
|
24918
|
+
return fileCached;
|
|
24919
|
+
}
|
|
24920
|
+
const res = await fetch(GITHUB_API, {
|
|
24921
|
+
headers: {
|
|
24922
|
+
accept: "application/vnd.github+json",
|
|
24923
|
+
"user-agent": `mikrotik-mcp/${VERSION}`
|
|
24924
|
+
}
|
|
24925
|
+
});
|
|
24926
|
+
if (!res.ok)
|
|
24927
|
+
throw new Error(`GitHub API ${res.status}`);
|
|
24928
|
+
const gh = await res.json();
|
|
24929
|
+
const latestVersion = gh.tag_name.replace(/^v/, "");
|
|
24930
|
+
const data = {
|
|
24931
|
+
version: latestVersion,
|
|
24932
|
+
name: gh.name || `v${latestVersion}`,
|
|
24933
|
+
body: gh.body || "",
|
|
24934
|
+
publishedAt: gh.published_at,
|
|
24935
|
+
url: gh.html_url,
|
|
24936
|
+
isNewer: compareVersions(latestVersion, VERSION) > 0,
|
|
24937
|
+
currentVersion: VERSION
|
|
24938
|
+
};
|
|
24939
|
+
memoryCache = { data, fetchedAt: Date.now() };
|
|
24940
|
+
saveFileCache(data);
|
|
24941
|
+
return data;
|
|
24942
|
+
}
|
|
24943
|
+
async function checkForUpdate() {
|
|
24944
|
+
try {
|
|
24945
|
+
const release = await fetchLatestRelease();
|
|
24946
|
+
return { release, checkedAt: Date.now(), fromCache: false };
|
|
24947
|
+
} catch (e) {
|
|
24948
|
+
const stale = loadFileCache(Infinity);
|
|
24949
|
+
if (stale) {
|
|
24950
|
+
return { release: stale, checkedAt: Date.now(), fromCache: true };
|
|
24951
|
+
}
|
|
24952
|
+
return {
|
|
24953
|
+
release: null,
|
|
24954
|
+
checkedAt: Date.now(),
|
|
24955
|
+
fromCache: false,
|
|
24956
|
+
error: e instanceof Error ? e.message : String(e)
|
|
24957
|
+
};
|
|
24958
|
+
}
|
|
24959
|
+
}
|
|
24960
|
+
function assessFreshness(current, latest) {
|
|
24961
|
+
const ca = current.replace(/^v/, "").split(".").map(Number);
|
|
24962
|
+
const la = latest.replace(/^v/, "").split(".").map(Number);
|
|
24963
|
+
const majorDiff = (la[0] ?? 0) - (ca[0] ?? 0);
|
|
24964
|
+
const minorDiff = (la[1] ?? 0) - (ca[1] ?? 0);
|
|
24965
|
+
const patchDiff = (la[2] ?? 0) - (ca[2] ?? 0);
|
|
24966
|
+
if (majorDiff > 0)
|
|
24967
|
+
return "ancient";
|
|
24968
|
+
if (minorDiff > 1)
|
|
24969
|
+
return "stale";
|
|
24970
|
+
if (minorDiff === 1)
|
|
24971
|
+
return "aging";
|
|
24972
|
+
if (patchDiff > 1)
|
|
24973
|
+
return "aging";
|
|
24974
|
+
return "fresh";
|
|
24975
|
+
}
|
|
24976
|
+
function updateSummaryLine(release) {
|
|
24977
|
+
if (!release.isNewer)
|
|
24978
|
+
return null;
|
|
24979
|
+
return `Server update available: MikroTik MCP v${release.version} ` + `(you are running v${VERSION}). ` + `Call check_server_pulse for release notes and upgrade commands, ` + `or upgrade directly: bun i -g @usex/mikrotik-mcp@latest`;
|
|
24980
|
+
}
|
|
24981
|
+
|
|
24982
|
+
// src/tools/server-pulse.ts
|
|
24983
|
+
var UPGRADE_COMMANDS = {
|
|
24984
|
+
bunx: "bunx @usex/mikrotik-mcp@latest",
|
|
24985
|
+
npx: "npx @usex/mikrotik-mcp@latest",
|
|
24986
|
+
"bun global": "bun add -g @usex/mikrotik-mcp@latest",
|
|
24987
|
+
"npm global": "npm install -g @usex/mikrotik-mcp@latest"
|
|
24988
|
+
};
|
|
24989
|
+
function formatUptime(seconds) {
|
|
24990
|
+
const d = Math.floor(seconds / 86400);
|
|
24991
|
+
const h = Math.floor(seconds % 86400 / 3600);
|
|
24992
|
+
const m = Math.floor(seconds % 3600 / 60);
|
|
24993
|
+
const s = seconds % 60;
|
|
24994
|
+
const parts = [];
|
|
24995
|
+
if (d)
|
|
24996
|
+
parts.push(`${d}d`);
|
|
24997
|
+
if (h)
|
|
24998
|
+
parts.push(`${h}h`);
|
|
24999
|
+
if (m)
|
|
25000
|
+
parts.push(`${m}m`);
|
|
25001
|
+
parts.push(`${s}s`);
|
|
25002
|
+
return parts.join(" ");
|
|
25003
|
+
}
|
|
25004
|
+
function freshnessLabel(f) {
|
|
25005
|
+
const labels = {
|
|
25006
|
+
fresh: "UP TO DATE",
|
|
25007
|
+
aging: "SLIGHTLY BEHIND",
|
|
25008
|
+
stale: "UPDATE RECOMMENDED",
|
|
25009
|
+
ancient: "CRITICAL UPDATE NEEDED"
|
|
25010
|
+
};
|
|
25011
|
+
return labels[f];
|
|
25012
|
+
}
|
|
25013
|
+
function timeAgo(iso) {
|
|
25014
|
+
const diff = Date.now() - new Date(iso).getTime();
|
|
25015
|
+
const days = Math.floor(diff / 86400000);
|
|
25016
|
+
if (days < 1)
|
|
25017
|
+
return "today";
|
|
25018
|
+
if (days === 1)
|
|
25019
|
+
return "yesterday";
|
|
25020
|
+
if (days < 30)
|
|
25021
|
+
return `${days} days ago`;
|
|
25022
|
+
if (days < 365)
|
|
25023
|
+
return `${Math.floor(days / 30)} months ago`;
|
|
25024
|
+
return `${Math.floor(days / 365)} years ago`;
|
|
25025
|
+
}
|
|
25026
|
+
var serverPulseTools = [
|
|
25027
|
+
defineTool({
|
|
25028
|
+
name: "check_server_pulse",
|
|
25029
|
+
title: "Server Pulse & Update Check",
|
|
25030
|
+
annotations: READ,
|
|
25031
|
+
description: "Check the MCP server's own heartbeat: running version, whether a newer release " + "is available, release notes for the latest version, upgrade commands, and server " + "vitals (tool count, uptime). This is server self-awareness \u2014 no RouterOS device " + "is contacted. Call this when the user asks about the MCP server version, updates, " + "what's new, or 'is my server up to date'. Returns rich release notes from GitHub " + "so you can summarize what changed.",
|
|
25032
|
+
inputSchema: {
|
|
25033
|
+
include_release_notes: z104.boolean().optional().describe("Include the full GitHub release notes markdown (default true). " + "Set false for a compact version-only check.")
|
|
25034
|
+
},
|
|
25035
|
+
async handler(args) {
|
|
25036
|
+
const includeNotes = args.include_release_notes !== false;
|
|
25037
|
+
const result = await checkForUpdate();
|
|
25038
|
+
const uptime = Math.floor(process.uptime());
|
|
25039
|
+
const sections = [];
|
|
25040
|
+
const sep = "\u2500".repeat(50);
|
|
25041
|
+
sections.push(`SERVER PULSE \u2014 ${SERVER_TITLE} v${VERSION}`, sep, "Package: @usex/mikrotik-mcp", `Version: ${VERSION}`, `Uptime: ${formatUptime(uptime)}`, `Website: ${WEBSITE_URL}`);
|
|
25042
|
+
if (result.release) {
|
|
25043
|
+
const freshness = assessFreshness(VERSION, result.release.version);
|
|
25044
|
+
const label = freshnessLabel(freshness);
|
|
25045
|
+
const age = timeAgo(result.release.publishedAt);
|
|
25046
|
+
sections.push("", `UPDATE STATUS: ${label}`, sep, `Current: v${VERSION}`, `Latest: v${result.release.version} (${result.release.name})`, `Published: ${age}`, `Freshness: ${freshness.toUpperCase()}`);
|
|
25047
|
+
if (result.release.isNewer) {
|
|
25048
|
+
sections.push("", ">>> A newer version is available! <<<");
|
|
25049
|
+
} else {
|
|
25050
|
+
sections.push("", "You are running the latest version.");
|
|
25051
|
+
}
|
|
25052
|
+
if (result.release.isNewer) {
|
|
25053
|
+
sections.push("", "UPGRADE", sep);
|
|
25054
|
+
for (const [method, cmd] of Object.entries(UPGRADE_COMMANDS)) {
|
|
25055
|
+
sections.push(` ${method.padEnd(12)} ${cmd}`);
|
|
25056
|
+
}
|
|
25057
|
+
sections.push("", `Release: ${result.release.url}`);
|
|
25058
|
+
}
|
|
25059
|
+
if (includeNotes && result.release.body && result.release.isNewer) {
|
|
25060
|
+
sections.push("", `WHAT'S NEW IN v${result.release.version}`, sep, result.release.body);
|
|
25061
|
+
}
|
|
25062
|
+
} else {
|
|
25063
|
+
sections.push("", "UPDATE STATUS: UNKNOWN", sep, `Could not check for updates${result.error ? `: ${result.error}` : "."}`, `Current version: v${VERSION}`, result.fromCache ? "(showing cached data)" : "(no cached data available \u2014 check network connectivity)");
|
|
25064
|
+
}
|
|
25065
|
+
return sections.join(`
|
|
25066
|
+
`);
|
|
25067
|
+
}
|
|
25068
|
+
})
|
|
25069
|
+
];
|
|
25070
|
+
|
|
25071
|
+
// src/tools/threat-feed.ts
|
|
25072
|
+
import { z as z105 } from "zod";
|
|
24850
25073
|
var FEED_TAG = "threat-feed";
|
|
24851
25074
|
var threatFeedTools = [
|
|
24852
25075
|
defineTool({
|
|
@@ -24855,12 +25078,12 @@ var threatFeedTools = [
|
|
|
24855
25078
|
annotations: WRITE,
|
|
24856
25079
|
description: "Subscribes the router to an external threat-intelligence IP feed: installs a `/system script` " + "that fetches `url` and imports it into the `address_list`, a `/system scheduler` that re-runs it " + "every `interval`, and (when `drop=true`) a raw pre-conntrack drop for that list \u2014 a self-updating " + "blocklist (e.g. Spamhaus DROP, tor exit nodes, your own deny list). `url` MUST point to a " + "RouterOS `.rsc` file that populates the address-list. DEFAULTS TO A DRY RUN (`apply=false`); set " + "`apply=true` to install. Script/scheduler/rule are named/tagged `threat-feed-<name>` so " + "remove_threat_feed can undo them. Returns the plan or a build report.",
|
|
24857
25080
|
inputSchema: {
|
|
24858
|
-
name:
|
|
24859
|
-
url:
|
|
24860
|
-
address_list:
|
|
24861
|
-
interval:
|
|
24862
|
-
drop:
|
|
24863
|
-
apply:
|
|
25081
|
+
name: z105.string().describe("Short feed id, e.g. 'spamhaus-drop'"),
|
|
25082
|
+
url: z105.string().describe("HTTPS URL of a RouterOS .rsc address-list file"),
|
|
25083
|
+
address_list: z105.string().default("threat-blocklist").describe("Address-list to populate"),
|
|
25084
|
+
interval: z105.string().default("1h").describe("How often to refresh the feed"),
|
|
25085
|
+
drop: z105.boolean().default(true).describe("Also add a raw drop rule for the address-list"),
|
|
25086
|
+
apply: z105.boolean().default(false).describe("false = preview (default); true = install")
|
|
24864
25087
|
},
|
|
24865
25088
|
async handler(a, ctx) {
|
|
24866
25089
|
const id = `${FEED_TAG}-${a.name}`;
|
|
@@ -24897,7 +25120,7 @@ ${plan}`;
|
|
|
24897
25120
|
title: "Remove Threat-Intel Feed",
|
|
24898
25121
|
annotations: DESTRUCTIVE,
|
|
24899
25122
|
description: "Removes a threat feed installed by subscribe_threat_feed: deletes its `/system scheduler` and " + "`/system script` (named `threat-feed-<name>`) and any raw drop rule tagged for it. Does NOT " + "flush the address-list entries themselves. Returns what was removed.",
|
|
24900
|
-
inputSchema: { name:
|
|
25123
|
+
inputSchema: { name: z105.string().describe("The feed id used when subscribing") },
|
|
24901
25124
|
async handler(a, ctx) {
|
|
24902
25125
|
const id = `${FEED_TAG}-${a.name}`;
|
|
24903
25126
|
ctx.info(`Removing threat feed ${id}`);
|
|
@@ -24919,7 +25142,7 @@ ${plan}`;
|
|
|
24919
25142
|
];
|
|
24920
25143
|
|
|
24921
25144
|
// src/tools/sstp.ts
|
|
24922
|
-
import { z as
|
|
25145
|
+
import { z as z106 } from "zod";
|
|
24923
25146
|
var sstpTools = [
|
|
24924
25147
|
defineTool({
|
|
24925
25148
|
name: "get_sstp_server",
|
|
@@ -24940,19 +25163,19 @@ ${result}`;
|
|
|
24940
25163
|
annotations: WRITE_IDEMPOTENT,
|
|
24941
25164
|
description: "Configure the global SSTP server listener (`/interface sstp-server server set`) \u2014 accepts/rejects incoming TLS VPN connections on this router. " + "Use to enable the server, bind a TLS certificate, change the TCP port, restrict authentication methods (comma-separated, e.g. `'mschap2,mschap1'`), set the default PPP profile, pin TLS version (`any` or `only-1.2`), or enforce client certificate verification. " + "This is a singleton write that modifies the server block, not a client interface. " + "To read the current server config use `get_sstp_server`. " + "To create outbound SSTP tunnels (this router dials out) use `create_sstp_client`; for L2TP outbound use `create_l2tp_client`, for OpenVPN use `create_ovpn_client`, for PPTP use `create_pptp_client`. " + "Returns the updated server block on success.",
|
|
24942
25165
|
inputSchema: {
|
|
24943
|
-
enabled:
|
|
24944
|
-
default_profile:
|
|
24945
|
-
authentication:
|
|
24946
|
-
certificate:
|
|
24947
|
-
port:
|
|
24948
|
-
tls_version:
|
|
24949
|
-
verify_client_certificate:
|
|
24950
|
-
pfs:
|
|
24951
|
-
force_aes:
|
|
24952
|
-
max_mtu:
|
|
24953
|
-
max_mru:
|
|
24954
|
-
mrru:
|
|
24955
|
-
keepalive_timeout:
|
|
25166
|
+
enabled: z106.boolean().optional(),
|
|
25167
|
+
default_profile: z106.string().optional(),
|
|
25168
|
+
authentication: z106.string().optional().describe("Comma-separated, e.g. 'mschap2,mschap1'"),
|
|
25169
|
+
certificate: z106.string().optional().describe("TLS certificate name"),
|
|
25170
|
+
port: z106.number().int().optional(),
|
|
25171
|
+
tls_version: z106.enum(["any", "only-1.2"]).optional(),
|
|
25172
|
+
verify_client_certificate: z106.boolean().optional(),
|
|
25173
|
+
pfs: z106.boolean().optional().describe("Enable Perfect Forward Secrecy"),
|
|
25174
|
+
force_aes: z106.boolean().optional().describe("Require clients to use AES ciphers"),
|
|
25175
|
+
max_mtu: z106.number().int().optional().describe("Maximum transmission unit"),
|
|
25176
|
+
max_mru: z106.number().int().optional().describe("Maximum receive unit"),
|
|
25177
|
+
mrru: z106.number().int().optional().describe("Max receive reconstructed unit for MP"),
|
|
25178
|
+
keepalive_timeout: z106.number().int().optional().describe("Seconds before an idle connection is considered down")
|
|
24956
25179
|
},
|
|
24957
25180
|
async handler(a, ctx) {
|
|
24958
25181
|
ctx.info("Configuring SSTP server");
|
|
@@ -24974,27 +25197,27 @@ ${details}`;
|
|
|
24974
25197
|
annotations: WRITE,
|
|
24975
25198
|
description: "Create an outbound SSTP client tunnel interface (`/interface sstp-client add`) so this router dials out to a remote SSTP server over TLS. " + "Use when this device must act as a VPN client, not the VPN server \u2014 for server-side settings use `set_sstp_server`. " + "`connect_to` is the remote server address (IP or DNS name); the TCP port is separate. " + "You may pass the port in `port` or inline as `host:port` in `connect_to` (it is split out " + "automatically \u2014 RouterOS rejects a port embedded in connect-to). SSTP defaults to 443. " + "For L2TP outbound tunnels use `create_l2tp_client`, for OpenVPN use `create_ovpn_client`, for PPTP use `create_pptp_client`. " + "Credentials are accepted but redacted from return values. " + "Returns the created interface detail (name, status, remote address); use the interface `name` with `get_sstp_client` or `remove_sstp_client`.",
|
|
24976
25199
|
inputSchema: {
|
|
24977
|
-
name:
|
|
24978
|
-
connect_to:
|
|
24979
|
-
port:
|
|
24980
|
-
user:
|
|
24981
|
-
password:
|
|
24982
|
-
profile:
|
|
24983
|
-
certificate:
|
|
24984
|
-
verify_server_certificate:
|
|
24985
|
-
authentication:
|
|
24986
|
-
tls_version:
|
|
24987
|
-
pfs:
|
|
24988
|
-
add_default_route:
|
|
24989
|
-
default_route_distance:
|
|
24990
|
-
dial_on_demand:
|
|
24991
|
-
max_mtu:
|
|
24992
|
-
max_mru:
|
|
24993
|
-
mrru:
|
|
24994
|
-
keepalive_timeout:
|
|
24995
|
-
http_proxy:
|
|
24996
|
-
comment:
|
|
24997
|
-
disabled:
|
|
25200
|
+
name: z106.string().describe("Name for the new SSTP client interface"),
|
|
25201
|
+
connect_to: z106.string().describe("Remote SSTP server address (IP or DNS name; host:port also accepted)"),
|
|
25202
|
+
port: z106.number().int().optional().describe("TCP port (default 443 if omitted)"),
|
|
25203
|
+
user: z106.string(),
|
|
25204
|
+
password: z106.string(),
|
|
25205
|
+
profile: z106.string().optional(),
|
|
25206
|
+
certificate: z106.string().optional().describe("Client TLS certificate name"),
|
|
25207
|
+
verify_server_certificate: z106.boolean().optional(),
|
|
25208
|
+
authentication: z106.string().optional().describe("Comma-separated, e.g. 'mschap2,mschap1'"),
|
|
25209
|
+
tls_version: z106.enum(["any", "only-1.2"]).optional(),
|
|
25210
|
+
pfs: z106.boolean().optional().describe("Enable Perfect Forward Secrecy"),
|
|
25211
|
+
add_default_route: z106.boolean().optional(),
|
|
25212
|
+
default_route_distance: z106.number().int().optional().describe("Distance of the auto-added default route"),
|
|
25213
|
+
dial_on_demand: z106.boolean().optional().describe("Connect only when traffic is sent over the tunnel"),
|
|
25214
|
+
max_mtu: z106.number().int().optional().describe("Maximum transmission unit"),
|
|
25215
|
+
max_mru: z106.number().int().optional().describe("Maximum receive unit"),
|
|
25216
|
+
mrru: z106.number().int().optional().describe("Max receive reconstructed unit for MP"),
|
|
25217
|
+
keepalive_timeout: z106.number().int().optional().describe("Seconds before an idle connection is considered down"),
|
|
25218
|
+
http_proxy: z106.string().optional(),
|
|
25219
|
+
comment: z106.string().optional(),
|
|
25220
|
+
disabled: z106.boolean().default(false)
|
|
24998
25221
|
},
|
|
24999
25222
|
async handler(a, ctx) {
|
|
25000
25223
|
ctx.info(`Creating SSTP client: name=${a.name}, connect_to=${a.connect_to}`);
|
|
@@ -25015,7 +25238,7 @@ ${redactSecrets(details)}` : "SSTP client creation completed but unable to verif
|
|
|
25015
25238
|
annotations: READ,
|
|
25016
25239
|
description: "List all outbound SSTP client tunnel interfaces (`/interface sstp-client print`), optionally narrowed by partial name match via `name_filter`. " + "Use to discover existing SSTP tunnels and their connection status before creating or removing one. " + "Passwords are redacted in the output. " + "For full detail on a single client use `get_sstp_client` with the interface name. " + "To inspect the inbound SSTP server config use `get_sstp_server`. " + "Returns a summary list of all matching SSTP client entries.",
|
|
25017
25240
|
inputSchema: {
|
|
25018
|
-
name_filter:
|
|
25241
|
+
name_filter: z106.string().optional().describe("Partial name match")
|
|
25019
25242
|
},
|
|
25020
25243
|
async handler(a, ctx) {
|
|
25021
25244
|
ctx.info("Listing SSTP clients");
|
|
@@ -25033,7 +25256,7 @@ ${redactSecrets(result)}`;
|
|
|
25033
25256
|
title: "Get SSTP Client Interface Detail",
|
|
25034
25257
|
annotations: READ,
|
|
25035
25258
|
description: "Return full detail for one SSTP client interface (`/interface sstp-client print detail where name=...`) by interface name \u2014 includes status, remote server address, TLS certificate, PPP profile, and connection options; passwords are redacted. " + "Use when you need the complete property set for a single tunnel rather than the summary list. " + "Use `list_sstp_clients` first to discover valid interface names. " + "For the inbound server configuration use `get_sstp_server`. " + "Returns the full detail block for the named interface, or a not-found message.",
|
|
25036
|
-
inputSchema: { name:
|
|
25259
|
+
inputSchema: { name: z106.string() },
|
|
25037
25260
|
async handler(a, ctx) {
|
|
25038
25261
|
ctx.info(`Getting SSTP client details: name=${a.name}`);
|
|
25039
25262
|
const result = await executeMikrotikCommand(`/interface sstp-client print detail where name="${a.name}"`, ctx);
|
|
@@ -25047,7 +25270,7 @@ ${redactSecrets(result)}`;
|
|
|
25047
25270
|
title: "Remove SSTP Client Interface",
|
|
25048
25271
|
annotations: DESTRUCTIVE,
|
|
25049
25272
|
description: "Permanently delete an SSTP client tunnel interface (`/interface sstp-client remove [find name=...]`) by interface name. " + "First verifies the interface exists (count-only check), then removes it; the tunnel is torn down immediately and the action is irreversible. " + "Use `list_sstp_clients` to confirm the interface name before calling this tool. " + "For L2TP, OpenVPN, or PPTP client interfaces see their respective tool scopes (`create_l2tp_client`, `create_ovpn_client`, `create_pptp_client`). " + "To deactivate the interface without deleting it use `disable_sstp_client` (re-activate with `enable_sstp_client`). " + "Returns a confirmation message on success or a not-found message if the name does not exist.",
|
|
25050
|
-
inputSchema: { name:
|
|
25273
|
+
inputSchema: { name: z106.string() },
|
|
25051
25274
|
async handler(a, ctx) {
|
|
25052
25275
|
ctx.info(`Removing SSTP client: name=${a.name}`);
|
|
25053
25276
|
const count = await executeMikrotikCommand(`/interface sstp-client print count-only where name="${a.name}"`, ctx);
|
|
@@ -25064,7 +25287,7 @@ ${redactSecrets(result)}`;
|
|
|
25064
25287
|
title: "Enable SSTP Client Interface",
|
|
25065
25288
|
annotations: WRITE_IDEMPOTENT,
|
|
25066
25289
|
description: "Enables a disabled SSTP client interface (`/interface sstp-client enable [find name=...]`), " + "causing the router to dial out and attempt the TLS connection to the remote SSTP server. " + "Use to activate a tunnel that was created disabled or stopped with `disable_sstp_client`. " + "For L2TP/PPTP/OpenVPN tunnels use their own enable tools. " + "Identifies the interface by name \u2014 create one with `create_sstp_client`.",
|
|
25067
|
-
inputSchema: { name:
|
|
25290
|
+
inputSchema: { name: z106.string() },
|
|
25068
25291
|
async handler(a, ctx) {
|
|
25069
25292
|
ctx.info(`Enabling SSTP client: name=${a.name}`);
|
|
25070
25293
|
const count = await executeMikrotikCommand(`/interface sstp-client print count-only where name="${a.name}"`, ctx);
|
|
@@ -25081,7 +25304,7 @@ ${redactSecrets(result)}`;
|
|
|
25081
25304
|
title: "Disable SSTP Client Interface",
|
|
25082
25305
|
annotations: WRITE_IDEMPOTENT,
|
|
25083
25306
|
description: "Disables an active SSTP client interface (`/interface sstp-client disable [find name=...]`), " + "tearing down the tunnel without removing its configuration. " + "Use to temporarily stop a tunnel while preserving its settings for later reuse. " + "To re-enable use `enable_sstp_client`; to permanently remove use `remove_sstp_client`.",
|
|
25084
|
-
inputSchema: { name:
|
|
25307
|
+
inputSchema: { name: z106.string() },
|
|
25085
25308
|
async handler(a, ctx) {
|
|
25086
25309
|
ctx.info(`Disabling SSTP client: name=${a.name}`);
|
|
25087
25310
|
const count = await executeMikrotikCommand(`/interface sstp-client print count-only where name="${a.name}"`, ctx);
|
|
@@ -25096,7 +25319,7 @@ ${redactSecrets(result)}`;
|
|
|
25096
25319
|
];
|
|
25097
25320
|
|
|
25098
25321
|
// src/tools/switch-settings.ts
|
|
25099
|
-
import { z as
|
|
25322
|
+
import { z as z107 } from "zod";
|
|
25100
25323
|
var switchSettingsTools = [
|
|
25101
25324
|
defineTool({
|
|
25102
25325
|
name: "list_switches",
|
|
@@ -25104,8 +25327,8 @@ var switchSettingsTools = [
|
|
|
25104
25327
|
annotations: READ,
|
|
25105
25328
|
description: "Lists hardware switch chips (`/interface ethernet switch`). " + "Use to discover switch chip names and types present on the device before targeting a chip with get_switch or update_switch. " + "Accepts optional `name_filter` and `type_filter` for partial-match filtering. " + "Returns chip name, type, and mirror/flow-control configuration for each matching entry; returns an empty message if none match.",
|
|
25106
25329
|
inputSchema: {
|
|
25107
|
-
name_filter:
|
|
25108
|
-
type_filter:
|
|
25330
|
+
name_filter: z107.string().optional().describe("Partial switch-name match"),
|
|
25331
|
+
type_filter: z107.string().optional().describe("Partial switch-type match")
|
|
25109
25332
|
},
|
|
25110
25333
|
async handler(a, ctx) {
|
|
25111
25334
|
ctx.info("Listing switches");
|
|
@@ -25126,7 +25349,7 @@ ${result}`;
|
|
|
25126
25349
|
annotations: READ,
|
|
25127
25350
|
description: "Fetches full detail for a single hardware switch chip (`/interface ethernet switch print detail`). " + "Use to inspect the current cpu-flow-control flag and mirror-source, mirror-target, and mirror-egress settings before modifying them with update_switch. " + "`switch_id` accepts the chip name (e.g. 'switch1') or the RouterOS `.id` returned by list_switches \u2014 tries `.id` lookup first, then falls back to name lookup. " + "Returns detailed chip settings or a not-found message.",
|
|
25128
25351
|
inputSchema: {
|
|
25129
|
-
switch_id:
|
|
25352
|
+
switch_id: z107.string().describe("Switch name (e.g. 'switch1') or RouterOS '.id'")
|
|
25130
25353
|
},
|
|
25131
25354
|
async handler(a, ctx) {
|
|
25132
25355
|
ctx.info(`Getting switch details: switch_id=${a.switch_id}`);
|
|
@@ -25150,14 +25373,14 @@ ${result}`;
|
|
|
25150
25373
|
|
|
25151
25374
|
` + "Returns updated switch details on success.",
|
|
25152
25375
|
inputSchema: {
|
|
25153
|
-
switch_id:
|
|
25154
|
-
name:
|
|
25155
|
-
cpu_flow_control:
|
|
25156
|
-
mirror_source:
|
|
25157
|
-
mirror_target:
|
|
25158
|
-
mirror_egress:
|
|
25159
|
-
mirror_egress_target:
|
|
25160
|
-
switch_all_ports:
|
|
25376
|
+
switch_id: z107.string().describe("Switch name (e.g. 'switch1') or RouterOS '.id'"),
|
|
25377
|
+
name: z107.string().optional().describe("Rename the switch"),
|
|
25378
|
+
cpu_flow_control: z107.boolean().optional(),
|
|
25379
|
+
mirror_source: z107.string().optional().describe("Source port to mirror, or 'none'"),
|
|
25380
|
+
mirror_target: z107.string().optional().describe("Monitor port, 'cpu', or 'none'"),
|
|
25381
|
+
mirror_egress: z107.string().optional().describe("Egress mirror source port (newer chips), or 'none'"),
|
|
25382
|
+
mirror_egress_target: z107.string().optional().describe("Egress mirror target port (88E6393X/88E6191X/88E6190 chips), or 'none'"),
|
|
25383
|
+
switch_all_ports: z107.boolean().optional().describe("Switch all ports together (RB450G/RB435G/RB850Gx2 only)")
|
|
25161
25384
|
},
|
|
25162
25385
|
async handler(a, ctx) {
|
|
25163
25386
|
ctx.info(`Updating switch: switch_id=${a.switch_id}`);
|
|
@@ -25180,9 +25403,9 @@ ${details}`;
|
|
|
25180
25403
|
];
|
|
25181
25404
|
|
|
25182
25405
|
// src/tools/switch-port.ts
|
|
25183
|
-
import { z as
|
|
25184
|
-
var VlanMode =
|
|
25185
|
-
var VlanHeader =
|
|
25406
|
+
import { z as z108 } from "zod";
|
|
25407
|
+
var VlanMode = z108.enum(["disabled", "optional", "enabled", "secure"]);
|
|
25408
|
+
var VlanHeader = z108.enum(["leave-as-is", "always-strip", "add-if-missing"]);
|
|
25186
25409
|
var switchPortTools = [
|
|
25187
25410
|
defineTool({
|
|
25188
25411
|
name: "list_switch_ports",
|
|
@@ -25190,8 +25413,8 @@ var switchPortTools = [
|
|
|
25190
25413
|
annotations: READ,
|
|
25191
25414
|
description: "List all switch chip ports (`/interface ethernet switch port print`) \u2014 the hardware-level " + "per-port VLAN configuration entries on RouterOS switch chips. " + "Use this to discover port names and their current vlan-mode, vlan-header, and " + "default-vlan-id (PVID) settings before updating them. " + "For a single port's full detail use get_switch_port; to change settings use update_switch_port. " + "Optional filters narrow results by partial port name or owning switch (e.g. 'switch1'). " + "Returns all matching port rows including VLAN mode, tag-header treatment, and PVID.",
|
|
25192
25415
|
inputSchema: {
|
|
25193
|
-
name_filter:
|
|
25194
|
-
switch_filter:
|
|
25416
|
+
name_filter: z108.string().optional().describe("Partial port-name match"),
|
|
25417
|
+
switch_filter: z108.string().optional().describe("Filter by owning switch, e.g. 'switch1'")
|
|
25195
25418
|
},
|
|
25196
25419
|
async handler(a, ctx) {
|
|
25197
25420
|
ctx.info("Listing switch ports");
|
|
@@ -25212,7 +25435,7 @@ ${result}`;
|
|
|
25212
25435
|
annotations: READ,
|
|
25213
25436
|
description: "Retrieve detailed settings for a single switch chip port (`/interface ethernet switch port print detail`) " + "by port name (e.g. 'ether1') or RouterOS '.id' from list_switch_ports. " + "Use this when you need the full attribute set of one port before updating it; " + "for all ports use list_switch_ports; to change settings use update_switch_port. " + "Returns a detailed view of vlan-mode, vlan-header, default-vlan-id, and force-vlan-id for the matched port.",
|
|
25214
25437
|
inputSchema: {
|
|
25215
|
-
port_id:
|
|
25438
|
+
port_id: z108.string().describe("Port name (e.g. 'ether1') or RouterOS '.id'")
|
|
25216
25439
|
},
|
|
25217
25440
|
async handler(a, ctx) {
|
|
25218
25441
|
ctx.info(`Getting switch port details: port_id=${a.port_id}`);
|
|
@@ -25238,11 +25461,11 @@ ${result}`;
|
|
|
25238
25461
|
` + ` 'always-strip', or 'add-if-missing'.
|
|
25239
25462
|
` + " default_vlan_id: PVID for untagged ingress ('auto', 'none', or a number).",
|
|
25240
25463
|
inputSchema: {
|
|
25241
|
-
port_id:
|
|
25242
|
-
default_vlan_id:
|
|
25464
|
+
port_id: z108.string().describe("Port name (e.g. 'ether1') or RouterOS '.id'"),
|
|
25465
|
+
default_vlan_id: z108.string().optional().describe("PVID: 'auto', 'none', or a VLAN id number"),
|
|
25243
25466
|
vlan_mode: VlanMode.optional(),
|
|
25244
25467
|
vlan_header: VlanHeader.optional(),
|
|
25245
|
-
force_vlan_id:
|
|
25468
|
+
force_vlan_id: z108.boolean().optional()
|
|
25246
25469
|
},
|
|
25247
25470
|
async handler(a, ctx) {
|
|
25248
25471
|
ctx.info(`Updating switch port: port_id=${a.port_id}`);
|
|
@@ -25264,7 +25487,7 @@ ${details}`;
|
|
|
25264
25487
|
];
|
|
25265
25488
|
|
|
25266
25489
|
// src/tools/switch-port-isolation.ts
|
|
25267
|
-
import { z as
|
|
25490
|
+
import { z as z109 } from "zod";
|
|
25268
25491
|
function selectorFor(id) {
|
|
25269
25492
|
return id.startsWith("*") ? `.id="${id}"` : `port="${id}"`;
|
|
25270
25493
|
}
|
|
@@ -25281,9 +25504,9 @@ var switchPortIsolationTools = [
|
|
|
25281
25504
|
` + ` port: source port to isolate, e.g. 'ether1'.
|
|
25282
25505
|
` + " forwarding_override_ports: comma-separated list of the ONLY ports this port " + " may forward to \u2014 all others are blocked in hardware.",
|
|
25283
25506
|
inputSchema: {
|
|
25284
|
-
port:
|
|
25285
|
-
forwarding_override_ports:
|
|
25286
|
-
comment:
|
|
25507
|
+
port: z109.string().describe("Source port to isolate, e.g. 'ether1'"),
|
|
25508
|
+
forwarding_override_ports: z109.string().describe("Comma-separated allowed destination ports"),
|
|
25509
|
+
comment: z109.string().optional()
|
|
25287
25510
|
},
|
|
25288
25511
|
async handler(a, ctx) {
|
|
25289
25512
|
ctx.info(`Adding switch port-isolation: port=${a.port}`);
|
|
@@ -25305,7 +25528,7 @@ ${details}` : "Switch port-isolation addition completed but unable to verify.";
|
|
|
25305
25528
|
|
|
25306
25529
|
` + "Returns a table of all matching entries; optionally filter by partial port name via port_filter.",
|
|
25307
25530
|
inputSchema: {
|
|
25308
|
-
port_filter:
|
|
25531
|
+
port_filter: z109.string().optional().describe("Partial source-port match")
|
|
25309
25532
|
},
|
|
25310
25533
|
async handler(a, ctx) {
|
|
25311
25534
|
ctx.info("Listing switch port-isolation entries");
|
|
@@ -25326,7 +25549,7 @@ ${result}`;
|
|
|
25326
25549
|
|
|
25327
25550
|
` + "Returns the full detail block for the matched entry, or a not-found message.",
|
|
25328
25551
|
inputSchema: {
|
|
25329
|
-
isolation_id:
|
|
25552
|
+
isolation_id: z109.string().describe("Source port name (e.g. 'ether1') or RouterOS '.id'")
|
|
25330
25553
|
},
|
|
25331
25554
|
async handler(a, ctx) {
|
|
25332
25555
|
ctx.info(`Getting switch port-isolation: isolation_id=${a.isolation_id}`);
|
|
@@ -25346,9 +25569,9 @@ ${result}`;
|
|
|
25346
25569
|
|
|
25347
25570
|
` + "Returns the entry's updated detail block.",
|
|
25348
25571
|
inputSchema: {
|
|
25349
|
-
isolation_id:
|
|
25350
|
-
forwarding_override_ports:
|
|
25351
|
-
comment:
|
|
25572
|
+
isolation_id: z109.string().describe("Source port name or RouterOS '.id'"),
|
|
25573
|
+
forwarding_override_ports: z109.string().optional().describe("Comma-separated allowed destination ports"),
|
|
25574
|
+
comment: z109.string().optional()
|
|
25352
25575
|
},
|
|
25353
25576
|
async handler(a, ctx) {
|
|
25354
25577
|
ctx.info(`Updating switch port-isolation: isolation_id=${a.isolation_id}`);
|
|
@@ -25377,7 +25600,7 @@ ${details}`;
|
|
|
25377
25600
|
|
|
25378
25601
|
` + "isolation_id accepts either the source port name (e.g. 'ether1') or the RouterOS `.id` " + "(e.g. '*1') from list_switch_port_isolation. Performs a count-only existence check before " + "removal and returns a not-found message if the entry does not exist. To add a new isolation rule " + "afterwards use add_switch_port_isolation; to only modify allowed ports use update_switch_port_isolation.",
|
|
25379
25602
|
inputSchema: {
|
|
25380
|
-
isolation_id:
|
|
25603
|
+
isolation_id: z109.string().describe("Source port name or RouterOS '.id'")
|
|
25381
25604
|
},
|
|
25382
25605
|
async handler(a, ctx) {
|
|
25383
25606
|
ctx.info(`Removing switch port-isolation: isolation_id=${a.isolation_id}`);
|
|
@@ -25394,7 +25617,7 @@ ${details}`;
|
|
|
25394
25617
|
];
|
|
25395
25618
|
|
|
25396
25619
|
// src/tools/switch-rule.ts
|
|
25397
|
-
import { z as
|
|
25620
|
+
import { z as z110 } from "zod";
|
|
25398
25621
|
var isDigits8 = (s) => /^\d+$/.test(s);
|
|
25399
25622
|
async function updateSwitchRule(a, ctx) {
|
|
25400
25623
|
ctx.info(`Updating switch rule: rule_id=${a.rule_id}`);
|
|
@@ -25461,32 +25684,32 @@ var switchRuleTools = [
|
|
|
25461
25684
|
` + ` rate: rate limit in bits/second.
|
|
25462
25685
|
` + " mac_protocol: e.g. 'ip', 'arp', 'vlan', or an EtherType number.",
|
|
25463
25686
|
inputSchema: {
|
|
25464
|
-
switch:
|
|
25465
|
-
ports:
|
|
25466
|
-
src_address:
|
|
25467
|
-
dst_address:
|
|
25468
|
-
src_address6:
|
|
25469
|
-
dst_address6:
|
|
25470
|
-
src_mac_address:
|
|
25471
|
-
dst_mac_address:
|
|
25472
|
-
src_port:
|
|
25473
|
-
dst_port:
|
|
25474
|
-
protocol:
|
|
25475
|
-
mac_protocol:
|
|
25476
|
-
vlan_header:
|
|
25477
|
-
vlan_id:
|
|
25478
|
-
vlan_priority:
|
|
25479
|
-
dscp:
|
|
25480
|
-
flow_label:
|
|
25481
|
-
new_dst_ports:
|
|
25482
|
-
new_vlan_id:
|
|
25483
|
-
new_vlan_priority:
|
|
25484
|
-
redirect_to_cpu:
|
|
25485
|
-
copy_to_cpu:
|
|
25486
|
-
mirror:
|
|
25487
|
-
rate:
|
|
25488
|
-
comment:
|
|
25489
|
-
disabled:
|
|
25687
|
+
switch: z110.string().describe("Owning switch chip, e.g. 'switch1'"),
|
|
25688
|
+
ports: z110.string().describe("Comma-separated source ports the rule matches"),
|
|
25689
|
+
src_address: z110.string().optional().describe("Source IP/mask"),
|
|
25690
|
+
dst_address: z110.string().optional().describe("Destination IP/mask"),
|
|
25691
|
+
src_address6: z110.string().optional().describe("Source IPv6 address/mask"),
|
|
25692
|
+
dst_address6: z110.string().optional().describe("Destination IPv6 address/mask"),
|
|
25693
|
+
src_mac_address: z110.string().optional().describe("Source MAC/mask"),
|
|
25694
|
+
dst_mac_address: z110.string().optional().describe("Destination MAC/mask"),
|
|
25695
|
+
src_port: z110.string().optional().describe("Layer-4 source port(s)"),
|
|
25696
|
+
dst_port: z110.string().optional().describe("Layer-4 destination port(s)"),
|
|
25697
|
+
protocol: z110.string().optional().describe("IP protocol, e.g. 'tcp'"),
|
|
25698
|
+
mac_protocol: z110.string().optional().describe("MAC protocol, e.g. 'ip', 'arp', 'vlan' or a number"),
|
|
25699
|
+
vlan_header: z110.enum(["any", "not-present", "present"]).optional().describe("Match on VLAN tag presence"),
|
|
25700
|
+
vlan_id: z110.string().optional(),
|
|
25701
|
+
vlan_priority: z110.string().optional(),
|
|
25702
|
+
dscp: z110.string().optional(),
|
|
25703
|
+
flow_label: z110.string().optional().describe("IPv6 flow label"),
|
|
25704
|
+
new_dst_ports: z110.string().optional().describe("Redirect target ports; empty string drops the traffic"),
|
|
25705
|
+
new_vlan_id: z110.string().optional(),
|
|
25706
|
+
new_vlan_priority: z110.string().optional(),
|
|
25707
|
+
redirect_to_cpu: z110.boolean().optional(),
|
|
25708
|
+
copy_to_cpu: z110.boolean().optional(),
|
|
25709
|
+
mirror: z110.boolean().optional(),
|
|
25710
|
+
rate: z110.string().optional().describe("Rate limit in bits/second"),
|
|
25711
|
+
comment: z110.string().optional(),
|
|
25712
|
+
disabled: z110.boolean().default(false)
|
|
25490
25713
|
},
|
|
25491
25714
|
async handler(a, ctx) {
|
|
25492
25715
|
ctx.info(`Adding switch rule: switch=${a.switch}, ports=${a.ports}`);
|
|
@@ -25520,9 +25743,9 @@ ${details}`;
|
|
|
25520
25743
|
annotations: READ,
|
|
25521
25744
|
description: "Lists all hardware switch ACL/redirect rules (`/interface ethernet switch rule print`) " + "on the switch chip. Use this to audit or discover existing rules before adding or updating. " + "Optional filters narrow by switch chip name, port name substring, or disabled-only status. " + "For software firewall rules use list_filter_rules; for NAT rules use list_nat_rules. " + "Returns a formatted table of all matching rules including their `.id` values needed by " + "get_switch_rule, update_switch_rule, remove_switch_rule, enable_switch_rule, and disable_switch_rule.",
|
|
25522
25745
|
inputSchema: {
|
|
25523
|
-
switch_filter:
|
|
25524
|
-
ports_filter:
|
|
25525
|
-
disabled_only:
|
|
25746
|
+
switch_filter: z110.string().optional(),
|
|
25747
|
+
ports_filter: z110.string().optional(),
|
|
25748
|
+
disabled_only: z110.boolean().default(false)
|
|
25526
25749
|
},
|
|
25527
25750
|
async handler(a, ctx) {
|
|
25528
25751
|
ctx.info("Listing switch rules");
|
|
@@ -25545,7 +25768,7 @@ ${result}`;
|
|
|
25545
25768
|
annotations: READ,
|
|
25546
25769
|
description: "Fetches full detail of a single hardware switch ACL/redirect rule " + "(`/interface ethernet switch rule print detail where .id=\u2026`). " + "Use this to inspect all match criteria and action fields of one rule. " + "`rule_id` takes the `.id` from list_switch_rules (e.g. '*1'). " + "For a tabular overview of all rules use list_switch_rules; " + "for software firewall rule detail use get_filter_rule.",
|
|
25547
25770
|
inputSchema: {
|
|
25548
|
-
rule_id:
|
|
25771
|
+
rule_id: z110.string().describe("RouterOS '.id', e.g. '*1' or '0'")
|
|
25549
25772
|
},
|
|
25550
25773
|
async handler(a, ctx) {
|
|
25551
25774
|
ctx.info(`Getting switch rule: rule_id=${a.rule_id}`);
|
|
@@ -25561,33 +25784,33 @@ ${result}`;
|
|
|
25561
25784
|
annotations: WRITE_IDEMPOTENT,
|
|
25562
25785
|
description: "Modifies an existing hardware switch ACL/redirect rule " + "(`/interface ethernet switch rule set`) by `.id`. " + "Use this to change match criteria (ports, addresses, VLAN, protocol) or actions " + "(redirect target ports, mirror, rate limit, disabled state). " + 'Pass an empty string ("") for any optional field to clear it. ' + "`rule_id` takes the `.id` from list_switch_rules. Returns the updated rule's full detail. " + "For software firewall rule edits use update_filter_rule; " + "to only toggle the enabled state use enable_switch_rule or disable_switch_rule.",
|
|
25563
25786
|
inputSchema: {
|
|
25564
|
-
rule_id:
|
|
25565
|
-
switch:
|
|
25566
|
-
ports:
|
|
25567
|
-
src_address:
|
|
25568
|
-
dst_address:
|
|
25569
|
-
src_address6:
|
|
25570
|
-
dst_address6:
|
|
25571
|
-
src_mac_address:
|
|
25572
|
-
dst_mac_address:
|
|
25573
|
-
src_port:
|
|
25574
|
-
dst_port:
|
|
25575
|
-
protocol:
|
|
25576
|
-
mac_protocol:
|
|
25577
|
-
vlan_header:
|
|
25578
|
-
vlan_id:
|
|
25579
|
-
vlan_priority:
|
|
25580
|
-
dscp:
|
|
25581
|
-
flow_label:
|
|
25582
|
-
new_dst_ports:
|
|
25583
|
-
new_vlan_id:
|
|
25584
|
-
new_vlan_priority:
|
|
25585
|
-
redirect_to_cpu:
|
|
25586
|
-
copy_to_cpu:
|
|
25587
|
-
mirror:
|
|
25588
|
-
rate:
|
|
25589
|
-
comment:
|
|
25590
|
-
disabled:
|
|
25787
|
+
rule_id: z110.string(),
|
|
25788
|
+
switch: z110.string().optional(),
|
|
25789
|
+
ports: z110.string().optional(),
|
|
25790
|
+
src_address: z110.string().optional(),
|
|
25791
|
+
dst_address: z110.string().optional(),
|
|
25792
|
+
src_address6: z110.string().optional(),
|
|
25793
|
+
dst_address6: z110.string().optional(),
|
|
25794
|
+
src_mac_address: z110.string().optional(),
|
|
25795
|
+
dst_mac_address: z110.string().optional(),
|
|
25796
|
+
src_port: z110.string().optional(),
|
|
25797
|
+
dst_port: z110.string().optional(),
|
|
25798
|
+
protocol: z110.string().optional(),
|
|
25799
|
+
mac_protocol: z110.string().optional(),
|
|
25800
|
+
vlan_header: z110.enum(["any", "not-present", "present"]).optional(),
|
|
25801
|
+
vlan_id: z110.string().optional(),
|
|
25802
|
+
vlan_priority: z110.string().optional(),
|
|
25803
|
+
dscp: z110.string().optional(),
|
|
25804
|
+
flow_label: z110.string().optional(),
|
|
25805
|
+
new_dst_ports: z110.string().optional(),
|
|
25806
|
+
new_vlan_id: z110.string().optional(),
|
|
25807
|
+
new_vlan_priority: z110.string().optional(),
|
|
25808
|
+
redirect_to_cpu: z110.boolean().optional(),
|
|
25809
|
+
copy_to_cpu: z110.boolean().optional(),
|
|
25810
|
+
mirror: z110.boolean().optional(),
|
|
25811
|
+
rate: z110.string().optional(),
|
|
25812
|
+
comment: z110.string().optional(),
|
|
25813
|
+
disabled: z110.boolean().optional()
|
|
25591
25814
|
},
|
|
25592
25815
|
async handler(a, ctx) {
|
|
25593
25816
|
return updateSwitchRule(a, ctx);
|
|
@@ -25598,7 +25821,7 @@ ${result}`;
|
|
|
25598
25821
|
title: "Remove Switch Chip ACL Rule",
|
|
25599
25822
|
annotations: DESTRUCTIVE,
|
|
25600
25823
|
description: "Permanently deletes a hardware switch ACL/redirect rule " + "(`/interface ethernet switch rule remove`) by `.id`. " + "Performs an existence check first and returns an error if the rule is not found. " + "`rule_id` takes the `.id` from list_switch_rules (e.g. '*1'). " + "To keep the rule but stop it from matching use disable_switch_rule instead. " + "For removing software firewall rules use remove_filter_rule.",
|
|
25601
|
-
inputSchema: { rule_id:
|
|
25824
|
+
inputSchema: { rule_id: z110.string() },
|
|
25602
25825
|
async handler(a, ctx) {
|
|
25603
25826
|
ctx.info(`Removing switch rule: rule_id=${a.rule_id}`);
|
|
25604
25827
|
const count = await executeMikrotikCommand(`/interface ethernet switch rule print count-only where .id=${a.rule_id}`, ctx);
|
|
@@ -25615,7 +25838,7 @@ ${result}`;
|
|
|
25615
25838
|
title: "Enable Switch Chip ACL Rule",
|
|
25616
25839
|
annotations: WRITE_IDEMPOTENT,
|
|
25617
25840
|
description: "Re-enables a previously disabled hardware switch ACL/redirect rule " + "(`/interface ethernet switch rule set \u2026 disabled=no`). " + "Use this to activate a rule without recreating it. " + "`rule_id` takes the `.id` from list_switch_rules (e.g. '*1'). " + "To deactivate a rule without deleting it use disable_switch_rule; " + "to permanently delete use remove_switch_rule. Returns the updated rule's full detail.",
|
|
25618
|
-
inputSchema: { rule_id:
|
|
25841
|
+
inputSchema: { rule_id: z110.string() },
|
|
25619
25842
|
async handler(a, ctx) {
|
|
25620
25843
|
return updateSwitchRule({ rule_id: a.rule_id, disabled: false }, ctx);
|
|
25621
25844
|
}
|
|
@@ -25625,7 +25848,7 @@ ${result}`;
|
|
|
25625
25848
|
title: "Disable Switch Chip ACL Rule",
|
|
25626
25849
|
annotations: WRITE_IDEMPOTENT,
|
|
25627
25850
|
description: "Deactivates a hardware switch ACL/redirect rule without deleting it " + "(`/interface ethernet switch rule set \u2026 disabled=yes`). " + "Use this to temporarily suspend a rule's match/action while preserving its configuration. " + "`rule_id` takes the `.id` from list_switch_rules (e.g. '*1'). " + "To reactivate the rule use enable_switch_rule; to permanently delete use remove_switch_rule. " + "Returns the updated rule's full detail.",
|
|
25628
|
-
inputSchema: { rule_id:
|
|
25851
|
+
inputSchema: { rule_id: z110.string() },
|
|
25629
25852
|
async handler(a, ctx) {
|
|
25630
25853
|
return updateSwitchRule({ rule_id: a.rule_id, disabled: true }, ctx);
|
|
25631
25854
|
}
|
|
@@ -25633,7 +25856,7 @@ ${result}`;
|
|
|
25633
25856
|
];
|
|
25634
25857
|
|
|
25635
25858
|
// src/tools/system-config.ts
|
|
25636
|
-
import { z as
|
|
25859
|
+
import { z as z111 } from "zod";
|
|
25637
25860
|
var systemConfigTools = [
|
|
25638
25861
|
defineTool({
|
|
25639
25862
|
name: "list_system_console",
|
|
@@ -25680,7 +25903,7 @@ ${result}`;
|
|
|
25680
25903
|
annotations: WRITE_IDEMPOTENT,
|
|
25681
25904
|
description: "Writes the global LED behaviour settings (`/system leds settings set`). " + "Use to enable dark mode by scheduling all LEDs off. " + "For per-LED trigger assignments use `list_leds`; to read current settings use `get_leds_settings`. " + "Accepts `all_leds_off`: `never` | `immediate` | `after-1h` | `after-1min`. " + "Returns the updated settings on success.",
|
|
25682
25905
|
inputSchema: {
|
|
25683
|
-
all_leds_off:
|
|
25906
|
+
all_leds_off: z111.enum(["never", "immediate", "after-1h", "after-1min"]).optional().describe("When to turn all LEDs off (dark mode)")
|
|
25684
25907
|
},
|
|
25685
25908
|
async handler(a, ctx) {
|
|
25686
25909
|
ctx.info("Setting LED settings");
|
|
@@ -25730,8 +25953,8 @@ ${result}`;
|
|
|
25730
25953
|
annotations: WRITE_IDEMPOTENT,
|
|
25731
25954
|
description: "Writes the system-wide login banner text (`/system note set`). " + "Use to set or clear the message displayed to users at login. " + "To read the current note use `get_note`. " + "Accepts optional `note` (text string) and `show_at_login` (boolean). " + "Returns the updated note on success.",
|
|
25732
25955
|
inputSchema: {
|
|
25733
|
-
note:
|
|
25734
|
-
show_at_login:
|
|
25956
|
+
note: z111.string().optional().describe("The note text to display"),
|
|
25957
|
+
show_at_login: z111.boolean().optional().describe("Show the note on login")
|
|
25735
25958
|
},
|
|
25736
25959
|
async handler(a, ctx) {
|
|
25737
25960
|
ctx.info("Setting system note");
|
|
@@ -25768,13 +25991,13 @@ ${result}`;
|
|
|
25768
25991
|
annotations: WRITE_IDEMPOTENT,
|
|
25769
25992
|
description: "Writes the device's built-in NTP *server* settings (`/system ntp server set`, RouterOS 7+). " + "Use to enable the router as a time server for LAN clients via broadcast, multicast, or manycast. " + "This tool configures the local NTP *server* role; to set upstream NTP *client* sources " + "use the NTP client tools in the system module. " + "Accepts `enabled`, `broadcast`, `multicast`, `manycast` (booleans) and `broadcast_address` (string). " + "Returns the updated server configuration on success.",
|
|
25770
25993
|
inputSchema: {
|
|
25771
|
-
enabled:
|
|
25772
|
-
broadcast:
|
|
25773
|
-
multicast:
|
|
25774
|
-
manycast:
|
|
25775
|
-
broadcast_address:
|
|
25776
|
-
use_local_clock:
|
|
25777
|
-
local_clock_stratum:
|
|
25994
|
+
enabled: z111.boolean().optional().describe("Enable or disable the NTP server"),
|
|
25995
|
+
broadcast: z111.boolean().optional(),
|
|
25996
|
+
multicast: z111.boolean().optional(),
|
|
25997
|
+
manycast: z111.boolean().optional(),
|
|
25998
|
+
broadcast_address: z111.string().optional().describe("Broadcast address for NTP broadcasts"),
|
|
25999
|
+
use_local_clock: z111.boolean().optional().describe("Serve time from the device's local clock as reference"),
|
|
26000
|
+
local_clock_stratum: z111.number().int().optional().describe("Stratum advertised when using the local clock (1-15)")
|
|
25778
26001
|
},
|
|
25779
26002
|
async handler(a, ctx) {
|
|
25780
26003
|
ctx.info("Setting NTP server configuration");
|
|
@@ -25797,8 +26020,8 @@ ${details}`;
|
|
|
25797
26020
|
annotations: WRITE,
|
|
25798
26021
|
description: "Changes the password of the currently authenticated user (`/password`). " + "Use to rotate the login credential without touching other user accounts; " + "passwords are never echoed in the response. " + "To manage other users' accounts or create new users use `add_user`. " + "Requires `old_password` and `new_password`; returns success or a rejection message (no credentials logged).",
|
|
25799
26022
|
inputSchema: {
|
|
25800
|
-
old_password:
|
|
25801
|
-
new_password:
|
|
26023
|
+
old_password: z111.string().describe("The current password"),
|
|
26024
|
+
new_password: z111.string().describe("The new password to set")
|
|
25802
26025
|
},
|
|
25803
26026
|
async handler(a, ctx) {
|
|
25804
26027
|
ctx.info("Changing device password");
|
|
@@ -25815,7 +26038,7 @@ ${details}`;
|
|
|
25815
26038
|
annotations: READ,
|
|
25816
26039
|
description: "Lists the physical serial ports registered on the device (`/port print`). " + "Use to discover available serial ports and their current line settings before reconfiguring. " + "For auto-login rules tied to a serial port use `list_special_login`; " + "for console session entries use `list_system_console`. " + "Accepts optional `name_filter` for partial name match. " + "Returns port entries or an empty message when none match.",
|
|
25817
26040
|
inputSchema: {
|
|
25818
|
-
name_filter:
|
|
26041
|
+
name_filter: z111.string().optional().describe("Partial port name match")
|
|
25819
26042
|
},
|
|
25820
26043
|
async handler(a, ctx) {
|
|
25821
26044
|
ctx.info("Listing serial ports");
|
|
@@ -25834,7 +26057,7 @@ ${result}`;
|
|
|
25834
26057
|
annotations: READ,
|
|
25835
26058
|
description: "Reads detailed settings for a named serial port (`/port print detail where name=...`). " + "Use to inspect baud rate, parity, data/stop bits, and flow control for a specific port. " + "For an overview of all ports use `list_ports`; to change settings use `set_port`. " + "Requires `name` (e.g. `serial0`). Returns full detail for the named port.",
|
|
25836
26059
|
inputSchema: {
|
|
25837
|
-
name:
|
|
26060
|
+
name: z111.string().describe("Serial port name, e.g. 'serial0'")
|
|
25838
26061
|
},
|
|
25839
26062
|
async handler(a, ctx) {
|
|
25840
26063
|
ctx.info(`Getting serial port details: name=${a.name}`);
|
|
@@ -25850,12 +26073,12 @@ ${result}`;
|
|
|
25850
26073
|
annotations: WRITE_IDEMPOTENT,
|
|
25851
26074
|
description: "Writes line settings for a named serial port (`/port set [find name=...]`). " + "Use to change baud rate, data bits, parity, stop bits, or flow control on a serial port. " + "To read current settings first use `get_port`; for a list of all ports use `list_ports`. " + "Requires `name` (e.g. `serial0`), plus optional `baud_rate` (e.g. `115200` or `auto`), " + "`data_bits`, `parity` (`none`|`odd`|`even`), `stop_bits`, " + "`flow_control` (`none`|`hardware`|`xon-xoff`). " + "Returns the updated port detail on success.",
|
|
25852
26075
|
inputSchema: {
|
|
25853
|
-
name:
|
|
25854
|
-
baud_rate:
|
|
25855
|
-
data_bits:
|
|
25856
|
-
parity:
|
|
25857
|
-
stop_bits:
|
|
25858
|
-
flow_control:
|
|
26076
|
+
name: z111.string().describe("Serial port name to update"),
|
|
26077
|
+
baud_rate: z111.string().optional().describe("e.g. '115200' or 'auto'"),
|
|
26078
|
+
data_bits: z111.number().int().optional(),
|
|
26079
|
+
parity: z111.enum(["none", "odd", "even"]).optional(),
|
|
26080
|
+
stop_bits: z111.number().int().optional(),
|
|
26081
|
+
flow_control: z111.enum(["none", "hardware", "xon-xoff"]).optional()
|
|
25859
26082
|
},
|
|
25860
26083
|
async handler(a, ctx) {
|
|
25861
26084
|
ctx.info(`Setting serial port: name=${a.name}`);
|
|
@@ -25894,12 +26117,12 @@ ${result}`;
|
|
|
25894
26117
|
annotations: DANGEROUS,
|
|
25895
26118
|
description: "Sends a factory-reset command to the device (`/system reset-configuration`). " + "Use ONLY to wipe the entire configuration and reboot into defaults \u2014 " + "the SSH connection will drop immediately after and all config will be lost. " + "Requires `confirm=true`; without it the command is blocked. " + "Optional: `keep_users` (preserve user accounts), `no_defaults` (skip loading default config), " + "`skip_backup` (skip automatic pre-reset backup), `caps_mode` (reset into CAPsMAN-managed CAP mode), " + "`run_after_reset` (script to execute post-reboot). " + "This operation is irreversible \u2014 there is no undo.",
|
|
25896
26119
|
inputSchema: {
|
|
25897
|
-
confirm:
|
|
25898
|
-
keep_users:
|
|
25899
|
-
no_defaults:
|
|
25900
|
-
skip_backup:
|
|
25901
|
-
caps_mode:
|
|
25902
|
-
run_after_reset:
|
|
26120
|
+
confirm: z111.boolean().describe("Must be true to actually ERASE the configuration"),
|
|
26121
|
+
keep_users: z111.boolean().optional().describe("Keep existing user accounts after reset"),
|
|
26122
|
+
no_defaults: z111.boolean().optional().describe("Do not load the default configuration"),
|
|
26123
|
+
skip_backup: z111.boolean().optional().describe("Skip the automatic backup before reset"),
|
|
26124
|
+
caps_mode: z111.boolean().optional().describe("Reset into CAPsMAN-managed CAP mode instead of standalone"),
|
|
26125
|
+
run_after_reset: z111.string().optional().describe("Script file to run after reset")
|
|
25903
26126
|
},
|
|
25904
26127
|
async handler(a, ctx) {
|
|
25905
26128
|
if (!a.confirm)
|
|
@@ -25944,12 +26167,12 @@ ${result}`;
|
|
|
25944
26167
|
annotations: WRITE_IDEMPOTENT,
|
|
25945
26168
|
description: "Writes the hardware/software watchdog timer settings (`/system watchdog set`). " + "Use to enable automatic reboots when the device becomes unresponsive " + "(triggered when pings to `watch_address` fail). " + "To read current settings use `get_watchdog`. " + "Accepts `watchdog_timer` (enable HW watchdog), `watch_address` (IP to ping), " + "`ping_timeout` (e.g. `1m`), `no_ping_delay` (e.g. `5m`), " + "`automatic_supout` (generate diagnostic file on crash), " + "`auto_send_supout` (email the diagnostic). " + "Returns the updated watchdog configuration on success.",
|
|
25946
26169
|
inputSchema: {
|
|
25947
|
-
watchdog_timer:
|
|
25948
|
-
watch_address:
|
|
25949
|
-
ping_timeout:
|
|
25950
|
-
no_ping_delay:
|
|
25951
|
-
automatic_supout:
|
|
25952
|
-
auto_send_supout:
|
|
26170
|
+
watchdog_timer: z111.boolean().optional().describe("Enable the hardware watchdog timer"),
|
|
26171
|
+
watch_address: z111.string().optional().describe("Address to ping; reboot if unreachable"),
|
|
26172
|
+
ping_timeout: z111.string().optional().describe("e.g. '1m'"),
|
|
26173
|
+
no_ping_delay: z111.string().optional().describe("e.g. '5m'"),
|
|
26174
|
+
automatic_supout: z111.boolean().optional().describe("Generate a supout.rif on software failure"),
|
|
26175
|
+
auto_send_supout: z111.boolean().optional().describe("Email the generated supout.rif")
|
|
25953
26176
|
},
|
|
25954
26177
|
async handler(a, ctx) {
|
|
25955
26178
|
ctx.info("Setting watchdog configuration");
|
|
@@ -25969,7 +26192,7 @@ ${details}`;
|
|
|
25969
26192
|
];
|
|
25970
26193
|
|
|
25971
26194
|
// src/tools/system.ts
|
|
25972
|
-
import { z as
|
|
26195
|
+
import { z as z112 } from "zod";
|
|
25973
26196
|
var systemTools = [
|
|
25974
26197
|
defineTool({
|
|
25975
26198
|
name: "get_system_identity",
|
|
@@ -25990,7 +26213,7 @@ ${result}`;
|
|
|
25990
26213
|
annotations: WRITE,
|
|
25991
26214
|
description: "Set the system hostname (`/system identity set`) \u2014 the name shown in neighbor discovery, " + "Winbox title bar, and SSH prompts. " + "To read the current value use `get_system_identity`. " + "Returns the updated identity after the change.",
|
|
25992
26215
|
inputSchema: {
|
|
25993
|
-
name:
|
|
26216
|
+
name: z112.string().describe("New system identity / hostname")
|
|
25994
26217
|
},
|
|
25995
26218
|
async handler(a, ctx) {
|
|
25996
26219
|
ctx.info(`Setting system identity: name=${a.name}`);
|
|
@@ -26062,10 +26285,10 @@ ${result}`;
|
|
|
26062
26285
|
annotations: WRITE,
|
|
26063
26286
|
description: "Set the system date, time, and/or time-zone (`/system clock set`). " + "Provide at least one of `time_zone_name` (e.g. `'Europe/Amsterdam'` or `'manual'`), " + "`date` (e.g. `'jun/19/2026'`), or `time` (e.g. `'13:45:00'`). " + "For automatic time synchronization configure NTP with `set_ntp_client`. " + "Returns the updated clock after the change.",
|
|
26064
26287
|
inputSchema: {
|
|
26065
|
-
time_zone_name:
|
|
26066
|
-
date:
|
|
26067
|
-
time:
|
|
26068
|
-
time_zone_autodetect:
|
|
26288
|
+
time_zone_name: z112.string().optional().describe("e.g. 'Europe/Amsterdam' or 'manual'"),
|
|
26289
|
+
date: z112.string().optional().describe("e.g. 'jun/19/2026'"),
|
|
26290
|
+
time: z112.string().optional().describe("e.g. '13:45:00'"),
|
|
26291
|
+
time_zone_autodetect: z112.boolean().optional().describe("Auto-detect the time zone from the public IP")
|
|
26069
26292
|
},
|
|
26070
26293
|
async handler(a, ctx) {
|
|
26071
26294
|
ctx.info("Setting system clock");
|
|
@@ -26100,10 +26323,10 @@ ${result}`;
|
|
|
26100
26323
|
annotations: WRITE,
|
|
26101
26324
|
description: "Configure the NTP client (`/system ntp client set`) \u2014 enable or disable it " + "and set the server list as a comma-separated string (e.g. `'0.pool.ntp.org,1.pool.ntp.org'`). " + "To read current NTP status use `get_ntp_client`; " + "to set the clock manually instead use `set_system_clock`. " + "Returns the updated NTP client configuration after the change.",
|
|
26102
26325
|
inputSchema: {
|
|
26103
|
-
enabled:
|
|
26104
|
-
servers:
|
|
26105
|
-
mode:
|
|
26106
|
-
vrf:
|
|
26326
|
+
enabled: z112.boolean().optional().describe("Enable or disable the NTP client"),
|
|
26327
|
+
servers: z112.string().optional().describe("Comma-separated NTP server list"),
|
|
26328
|
+
mode: z112.enum(["unicast", "broadcast", "multicast", "manycast"]).optional().describe("NTP client operating mode"),
|
|
26329
|
+
vrf: z112.string().optional().describe("VRF the NTP client operates in (e.g. 'main')")
|
|
26107
26330
|
},
|
|
26108
26331
|
async handler(a, ctx) {
|
|
26109
26332
|
ctx.info("Setting NTP client configuration");
|
|
@@ -26162,7 +26385,7 @@ ${result}`;
|
|
|
26162
26385
|
annotations: DANGEROUS,
|
|
26163
26386
|
description: "Send a reboot command to the device (`/system reboot`). " + "This is a high-blast-radius action: all connections drop and the device is offline for " + "1-2 minutes while it restarts. " + "Must pass `confirm=true` or the command is rejected without touching the device. " + "For a permanent power-off use `shutdown_system`.",
|
|
26164
26387
|
inputSchema: {
|
|
26165
|
-
confirm:
|
|
26388
|
+
confirm: z112.boolean().describe("Must be true to actually reboot the device")
|
|
26166
26389
|
},
|
|
26167
26390
|
async handler(a, ctx) {
|
|
26168
26391
|
if (!a.confirm)
|
|
@@ -26178,7 +26401,7 @@ ${result}`;
|
|
|
26178
26401
|
annotations: DANGEROUS,
|
|
26179
26402
|
description: "Power off the device (`/system shutdown`). " + "This is a high-blast-radius action: all connections drop and the device remains offline " + "until physically powered on again. " + "Must pass `confirm=true` or the command is rejected without touching the device. " + "For a temporary restart use `reboot_system`.",
|
|
26180
26403
|
inputSchema: {
|
|
26181
|
-
confirm:
|
|
26404
|
+
confirm: z112.boolean().describe("Must be true to actually shut down the device")
|
|
26182
26405
|
},
|
|
26183
26406
|
async handler(a, ctx) {
|
|
26184
26407
|
if (!a.confirm)
|
|
@@ -26191,10 +26414,10 @@ ${result}`;
|
|
|
26191
26414
|
];
|
|
26192
26415
|
|
|
26193
26416
|
// src/tools/tunnels.ts
|
|
26194
|
-
import { z as
|
|
26195
|
-
var DontFragment =
|
|
26196
|
-
var Arp =
|
|
26197
|
-
var VtepsIpVersion =
|
|
26417
|
+
import { z as z113 } from "zod";
|
|
26418
|
+
var DontFragment = z113.enum(["inherit", "no"]);
|
|
26419
|
+
var Arp = z113.enum(["disabled", "enabled", "local-proxy-arp", "proxy-arp", "reply-only"]);
|
|
26420
|
+
var VtepsIpVersion = z113.enum(["ipv4", "ipv6"]);
|
|
26198
26421
|
var tunnelTools = [
|
|
26199
26422
|
defineTool({
|
|
26200
26423
|
name: "create_gre_tunnel",
|
|
@@ -26202,18 +26425,18 @@ var tunnelTools = [
|
|
|
26202
26425
|
annotations: WRITE,
|
|
26203
26426
|
description: "Creates an IPv4 GRE (Generic Routing Encapsulation) L3 tunnel interface (`/interface gre`)." + " Use to encapsulate routed traffic between two endpoints for site-to-site connectivity when IPsec encryption is not needed." + " GRE is L3-only and not bridgeable; for bridgeable L2 Ethernet-over-IP tunnels use create_eoip_tunnel;" + " for raw IP-in-IP with less overhead use create_ipip_tunnel; for L2 VXLAN overlays use create_vxlan_tunnel;" + " for VPN client interfaces use create_l2tp_client, create_pptp_client, create_sstp_client, or create_ovpn_client." + " Keepalive format: '<interval>,<retries>', e.g. '10s,3'." + " Returns the created interface detail including name, remote-address, and run-time status.",
|
|
26204
26427
|
inputSchema: {
|
|
26205
|
-
name:
|
|
26206
|
-
remote_address:
|
|
26207
|
-
local_address:
|
|
26208
|
-
keepalive:
|
|
26428
|
+
name: z113.string().describe("Name for the new GRE tunnel interface, e.g. 'gre-to-hq'"),
|
|
26429
|
+
remote_address: z113.string().describe("Remote endpoint IP address"),
|
|
26430
|
+
local_address: z113.string().optional().describe("Local endpoint IP address"),
|
|
26431
|
+
keepalive: z113.string().optional().describe("Keepalive interval/retries, e.g. '10s,3'"),
|
|
26209
26432
|
dont_fragment: DontFragment.optional().describe("Don't-fragment behavior"),
|
|
26210
|
-
clamp_tcp_mss:
|
|
26211
|
-
allow_fast_path:
|
|
26212
|
-
ipsec_secret:
|
|
26213
|
-
dscp:
|
|
26214
|
-
mtu:
|
|
26215
|
-
comment:
|
|
26216
|
-
disabled:
|
|
26433
|
+
clamp_tcp_mss: z113.boolean().optional().describe("Clamp TCP MSS to the tunnel MTU"),
|
|
26434
|
+
allow_fast_path: z113.boolean().optional().describe("Allow FastPath processing for this tunnel"),
|
|
26435
|
+
ipsec_secret: z113.string().optional().describe("Pre-shared key to auto-create an IPsec policy securing the tunnel"),
|
|
26436
|
+
dscp: z113.string().optional().describe("DSCP for encapsulated packets: 'inherit' or 0-63"),
|
|
26437
|
+
mtu: z113.number().int().optional(),
|
|
26438
|
+
comment: z113.string().optional(),
|
|
26439
|
+
disabled: z113.boolean().default(false)
|
|
26217
26440
|
},
|
|
26218
26441
|
async handler(a, ctx) {
|
|
26219
26442
|
ctx.info(`Creating GRE tunnel: name=${a.name}, remote_address=${a.remote_address}`);
|
|
@@ -26233,7 +26456,7 @@ ${details}` : "GRE tunnel creation completed but unable to verify.";
|
|
|
26233
26456
|
annotations: READ,
|
|
26234
26457
|
description: "Lists all GRE tunnel interfaces (`/interface gre print`)." + " Use to inventory or audit existing GRE tunnels and their remote endpoints." + " Supports optional partial name filter via name_filter." + " For full detail on one tunnel use get_gre_tunnel; for IPIP tunnels use list_ipip_tunnels;" + " for EoIP tunnels use list_eoip_tunnels; for VXLAN use list_vxlan_tunnels." + " Returns name, remote-address, local-address, MTU, and run-time status for each interface.",
|
|
26235
26458
|
inputSchema: {
|
|
26236
|
-
name_filter:
|
|
26459
|
+
name_filter: z113.string().optional().describe("Partial name match")
|
|
26237
26460
|
},
|
|
26238
26461
|
async handler(a, ctx) {
|
|
26239
26462
|
ctx.info("Listing GRE tunnels");
|
|
@@ -26251,7 +26474,7 @@ ${result}`;
|
|
|
26251
26474
|
title: "Get GRE Tunnel Interface Detail",
|
|
26252
26475
|
annotations: READ,
|
|
26253
26476
|
description: "Fetches full detail for a single GRE tunnel interface by name (`/interface gre print detail where name=...`)." + " Use to inspect all parameters of one tunnel \u2014 remote-address, local-address, keepalive, MTU, dont-fragment, and status." + " For a summary list of all GRE tunnels use list_gre_tunnels." + " For IPIP detail use get_ipip_tunnel; for EoIP detail use get_eoip_tunnel; for VXLAN detail use get_vxlan_tunnel." + " Returns the complete property set for the named interface, or a not-found message.",
|
|
26254
|
-
inputSchema: { name:
|
|
26477
|
+
inputSchema: { name: z113.string() },
|
|
26255
26478
|
async handler(a, ctx) {
|
|
26256
26479
|
ctx.info(`Getting GRE tunnel details: name=${a.name}`);
|
|
26257
26480
|
const result = await executeMikrotikCommand(`/interface gre print detail where name="${a.name}"`, ctx);
|
|
@@ -26265,7 +26488,7 @@ ${result}`;
|
|
|
26265
26488
|
title: "Remove GRE Tunnel Interface",
|
|
26266
26489
|
annotations: DESTRUCTIVE,
|
|
26267
26490
|
description: "Permanently deletes a GRE tunnel interface by name (`/interface gre remove [find name=...]`)." + " Verifies existence via count-only before removal and returns a not-found message if the interface does not exist." + " This is destructive and immediately disconnects any traffic using the tunnel." + " For IPIP removal use remove_ipip_tunnel; for EoIP use remove_eoip_tunnel; for VXLAN use remove_vxlan_tunnel.",
|
|
26268
|
-
inputSchema: { name:
|
|
26491
|
+
inputSchema: { name: z113.string() },
|
|
26269
26492
|
async handler(a, ctx) {
|
|
26270
26493
|
ctx.info(`Removing GRE tunnel: name=${a.name}`);
|
|
26271
26494
|
const count = await executeMikrotikCommand(`/interface gre print count-only where name="${a.name}"`, ctx);
|
|
@@ -26283,18 +26506,18 @@ ${result}`;
|
|
|
26283
26506
|
annotations: WRITE,
|
|
26284
26507
|
description: "Creates an IPv4 IPIP (IP-in-IP) L3 tunnel interface (`/interface ipip`)." + " Use for lightweight point-to-point IP encapsulation with minimal overhead when GRE's extra header byte is undesirable." + " IPIP is L3-only and not bridgeable; for GRE encapsulation (with dont-fragment support) use create_gre_tunnel;" + " for L2 Ethernet-over-IP tunnels use create_eoip_tunnel; for VXLAN L2 overlays use create_vxlan_tunnel." + " Keepalive format: '<interval>,<retries>', e.g. '10s,3'." + " Returns the created interface detail including name, remote-address, and run-time status.",
|
|
26285
26508
|
inputSchema: {
|
|
26286
|
-
name:
|
|
26287
|
-
remote_address:
|
|
26288
|
-
local_address:
|
|
26289
|
-
keepalive:
|
|
26509
|
+
name: z113.string().describe("Name for the new IPIP tunnel interface, e.g. 'ipip-to-hq'"),
|
|
26510
|
+
remote_address: z113.string().describe("Remote endpoint IP address"),
|
|
26511
|
+
local_address: z113.string().optional().describe("Local endpoint IP address"),
|
|
26512
|
+
keepalive: z113.string().optional().describe("Keepalive interval/retries, e.g. '10s,3'"),
|
|
26290
26513
|
dont_fragment: DontFragment.optional().describe("Don't-fragment behavior"),
|
|
26291
|
-
clamp_tcp_mss:
|
|
26292
|
-
allow_fast_path:
|
|
26293
|
-
ipsec_secret:
|
|
26294
|
-
dscp:
|
|
26295
|
-
mtu:
|
|
26296
|
-
comment:
|
|
26297
|
-
disabled:
|
|
26514
|
+
clamp_tcp_mss: z113.boolean().optional().describe("Clamp TCP MSS to the tunnel MTU"),
|
|
26515
|
+
allow_fast_path: z113.boolean().optional().describe("Allow FastPath processing for this tunnel"),
|
|
26516
|
+
ipsec_secret: z113.string().optional().describe("Pre-shared key to auto-create an IPsec policy securing the tunnel"),
|
|
26517
|
+
dscp: z113.string().optional().describe("DSCP for encapsulated packets: 'inherit' or 0-63"),
|
|
26518
|
+
mtu: z113.number().int().optional(),
|
|
26519
|
+
comment: z113.string().optional(),
|
|
26520
|
+
disabled: z113.boolean().default(false)
|
|
26298
26521
|
},
|
|
26299
26522
|
async handler(a, ctx) {
|
|
26300
26523
|
ctx.info(`Creating IPIP tunnel: name=${a.name}, remote_address=${a.remote_address}`);
|
|
@@ -26314,7 +26537,7 @@ ${details}` : "IPIP tunnel creation completed but unable to verify.";
|
|
|
26314
26537
|
annotations: READ,
|
|
26315
26538
|
description: "Lists all IPIP tunnel interfaces (`/interface ipip print`)." + " Use to inventory existing IPIP tunnels and their remote endpoints." + " Supports optional partial name filter via name_filter." + " For full detail on one tunnel use get_ipip_tunnel; for GRE tunnels use list_gre_tunnels;" + " for EoIP tunnels use list_eoip_tunnels; for VXLAN use list_vxlan_tunnels." + " Returns name, remote-address, local-address, MTU, and run-time status for each interface.",
|
|
26316
26539
|
inputSchema: {
|
|
26317
|
-
name_filter:
|
|
26540
|
+
name_filter: z113.string().optional().describe("Partial name match")
|
|
26318
26541
|
},
|
|
26319
26542
|
async handler(a, ctx) {
|
|
26320
26543
|
ctx.info("Listing IPIP tunnels");
|
|
@@ -26332,7 +26555,7 @@ ${result}`;
|
|
|
26332
26555
|
title: "Get IPIP Tunnel Interface Detail",
|
|
26333
26556
|
annotations: READ,
|
|
26334
26557
|
description: "Fetches full detail for a single IPIP tunnel interface by name (`/interface ipip print detail where name=...`)." + " Use to inspect all parameters of one tunnel \u2014 remote-address, local-address, keepalive, MTU, and status." + " For a summary list of all IPIP tunnels use list_ipip_tunnels." + " For GRE detail use get_gre_tunnel; for EoIP detail use get_eoip_tunnel; for VXLAN detail use get_vxlan_tunnel." + " Returns the complete property set for the named interface, or a not-found message.",
|
|
26335
|
-
inputSchema: { name:
|
|
26558
|
+
inputSchema: { name: z113.string() },
|
|
26336
26559
|
async handler(a, ctx) {
|
|
26337
26560
|
ctx.info(`Getting IPIP tunnel details: name=${a.name}`);
|
|
26338
26561
|
const result = await executeMikrotikCommand(`/interface ipip print detail where name="${a.name}"`, ctx);
|
|
@@ -26346,7 +26569,7 @@ ${result}`;
|
|
|
26346
26569
|
title: "Remove IPIP Tunnel Interface",
|
|
26347
26570
|
annotations: DESTRUCTIVE,
|
|
26348
26571
|
description: "Permanently deletes an IPIP tunnel interface by name (`/interface ipip remove [find name=...]`)." + " Verifies existence via count-only before removal and returns a not-found message if the interface does not exist." + " This is destructive and immediately disconnects any traffic using the tunnel." + " For GRE removal use remove_gre_tunnel; for EoIP use remove_eoip_tunnel; for VXLAN use remove_vxlan_tunnel.",
|
|
26349
|
-
inputSchema: { name:
|
|
26572
|
+
inputSchema: { name: z113.string() },
|
|
26350
26573
|
async handler(a, ctx) {
|
|
26351
26574
|
ctx.info(`Removing IPIP tunnel: name=${a.name}`);
|
|
26352
26575
|
const count = await executeMikrotikCommand(`/interface ipip print count-only where name="${a.name}"`, ctx);
|
|
@@ -26364,22 +26587,22 @@ ${result}`;
|
|
|
26364
26587
|
annotations: WRITE,
|
|
26365
26588
|
description: "Creates an EoIP (Ethernet over IP) L2 tunnel interface (`/interface eoip`)." + " Use when you need a bridgeable L2 link between two MikroTik devices \u2014 traffic appears as raw Ethernet frames over IP." + " Each tunnel requires a unique tunnel_id (0-65535) that must match identically on both peers; mismatched IDs are the most common misconfiguration." + " EoIP is MikroTik-proprietary \u2014 both endpoints must run RouterOS." + " For L3-only encapsulation use create_gre_tunnel or create_ipip_tunnel; for open-standard L2 overlays use create_vxlan_tunnel." + " Keepalive format: '<interval>,<retries>', e.g. '10s,3'." + " Returns the created interface detail including name, remote-address, tunnel-id, and run-time status.",
|
|
26366
26589
|
inputSchema: {
|
|
26367
|
-
name:
|
|
26368
|
-
remote_address:
|
|
26369
|
-
tunnel_id:
|
|
26370
|
-
local_address:
|
|
26371
|
-
keepalive:
|
|
26590
|
+
name: z113.string().describe("Name for the new EoIP tunnel interface, e.g. 'eoip-to-hq'"),
|
|
26591
|
+
remote_address: z113.string().describe("Remote endpoint IP address"),
|
|
26592
|
+
tunnel_id: z113.number().int().describe("Unique tunnel ID, must match on both peers"),
|
|
26593
|
+
local_address: z113.string().optional().describe("Local endpoint IP address"),
|
|
26594
|
+
keepalive: z113.string().optional().describe("Keepalive interval/retries, e.g. '10s,3'"),
|
|
26372
26595
|
dont_fragment: DontFragment.optional().describe("Don't-fragment behavior"),
|
|
26373
|
-
clamp_tcp_mss:
|
|
26374
|
-
allow_fast_path:
|
|
26375
|
-
ipsec_secret:
|
|
26376
|
-
dscp:
|
|
26377
|
-
mac_address:
|
|
26596
|
+
clamp_tcp_mss: z113.boolean().optional().describe("Clamp TCP MSS to the tunnel MTU"),
|
|
26597
|
+
allow_fast_path: z113.boolean().optional().describe("Allow FastPath processing for this tunnel"),
|
|
26598
|
+
ipsec_secret: z113.string().optional().describe("Pre-shared key to auto-create an IPsec policy securing the tunnel"),
|
|
26599
|
+
dscp: z113.string().optional().describe("DSCP for encapsulated packets: 'inherit' or 0-63"),
|
|
26600
|
+
mac_address: z113.string().optional().describe("MAC address of the EoIP interface"),
|
|
26378
26601
|
arp: Arp.optional().describe("Address Resolution Protocol mode for the interface"),
|
|
26379
|
-
arp_timeout:
|
|
26380
|
-
mtu:
|
|
26381
|
-
comment:
|
|
26382
|
-
disabled:
|
|
26602
|
+
arp_timeout: z113.string().optional().describe("ARP entry timeout, e.g. '30s' or 'auto'"),
|
|
26603
|
+
mtu: z113.number().int().optional(),
|
|
26604
|
+
comment: z113.string().optional(),
|
|
26605
|
+
disabled: z113.boolean().default(false)
|
|
26383
26606
|
},
|
|
26384
26607
|
async handler(a, ctx) {
|
|
26385
26608
|
ctx.info(`Creating EoIP tunnel: name=${a.name}, remote_address=${a.remote_address}, tunnel_id=${a.tunnel_id}`);
|
|
@@ -26399,7 +26622,7 @@ ${details}` : "EoIP tunnel creation completed but unable to verify.";
|
|
|
26399
26622
|
annotations: READ,
|
|
26400
26623
|
description: "Lists all EoIP tunnel interfaces (`/interface eoip print`)." + " Use to inventory existing EoIP tunnels and check their tunnel-id assignments to detect duplicates or mismatches." + " Supports optional partial name filter via name_filter." + " For full detail on one tunnel use get_eoip_tunnel; for GRE tunnels use list_gre_tunnels;" + " for IPIP tunnels use list_ipip_tunnels; for VXLAN use list_vxlan_tunnels." + " Returns name, remote-address, tunnel-id, MTU, and run-time status for each interface.",
|
|
26401
26624
|
inputSchema: {
|
|
26402
|
-
name_filter:
|
|
26625
|
+
name_filter: z113.string().optional().describe("Partial name match")
|
|
26403
26626
|
},
|
|
26404
26627
|
async handler(a, ctx) {
|
|
26405
26628
|
ctx.info("Listing EoIP tunnels");
|
|
@@ -26417,7 +26640,7 @@ ${result}`;
|
|
|
26417
26640
|
title: "Get EoIP Tunnel Interface Detail",
|
|
26418
26641
|
annotations: READ,
|
|
26419
26642
|
description: "Fetches full detail for a single EoIP tunnel interface by name (`/interface eoip print detail where name=...`)." + " Use to inspect the tunnel-id, remote-address, local-address, keepalive, MTU, and status of one tunnel." + " For a summary list of all EoIP tunnels use list_eoip_tunnels." + " For GRE detail use get_gre_tunnel; for IPIP detail use get_ipip_tunnel; for VXLAN detail use get_vxlan_tunnel." + " Returns the complete property set for the named interface, or a not-found message.",
|
|
26420
|
-
inputSchema: { name:
|
|
26643
|
+
inputSchema: { name: z113.string() },
|
|
26421
26644
|
async handler(a, ctx) {
|
|
26422
26645
|
ctx.info(`Getting EoIP tunnel details: name=${a.name}`);
|
|
26423
26646
|
const result = await executeMikrotikCommand(`/interface eoip print detail where name="${a.name}"`, ctx);
|
|
@@ -26431,7 +26654,7 @@ ${result}`;
|
|
|
26431
26654
|
title: "Remove EoIP Tunnel Interface",
|
|
26432
26655
|
annotations: DESTRUCTIVE,
|
|
26433
26656
|
description: "Permanently deletes an EoIP tunnel interface by name (`/interface eoip remove [find name=...]`)." + " Verifies existence via count-only before removal and returns a not-found message if the interface does not exist." + " This is destructive and immediately severs the L2 bridge link using this tunnel." + " For GRE removal use remove_gre_tunnel; for IPIP use remove_ipip_tunnel; for VXLAN use remove_vxlan_tunnel.",
|
|
26434
|
-
inputSchema: { name:
|
|
26657
|
+
inputSchema: { name: z113.string() },
|
|
26435
26658
|
async handler(a, ctx) {
|
|
26436
26659
|
ctx.info(`Removing EoIP tunnel: name=${a.name}`);
|
|
26437
26660
|
const count = await executeMikrotikCommand(`/interface eoip print count-only where name="${a.name}"`, ctx);
|
|
@@ -26449,21 +26672,21 @@ ${result}`;
|
|
|
26449
26672
|
annotations: WRITE,
|
|
26450
26673
|
description: "Creates a VXLAN (Virtual Extensible LAN) L2 overlay interface (`/interface vxlan`)." + " Use to build scalable L2 overlays across L3 networks \u2014 the VNI (VXLAN Network Identifier) scopes the broadcast domain, suited for multi-tenant or data-centre scenarios." + " VXLAN is an open standard and works with non-MikroTik peers; for MikroTik-proprietary L2 tunnels use create_eoip_tunnel;" + " for L3-only encapsulation use create_gre_tunnel or create_ipip_tunnel." + " UDP port defaults to 8472; VNI must match on all participating VTEPs." + " Returns the created interface detail including name, VNI, port, and run-time status.",
|
|
26451
26674
|
inputSchema: {
|
|
26452
|
-
name:
|
|
26453
|
-
vni:
|
|
26454
|
-
port:
|
|
26455
|
-
local_address:
|
|
26456
|
-
interface:
|
|
26457
|
-
group:
|
|
26675
|
+
name: z113.string().describe("Name for the new VXLAN interface, e.g. 'vxlan1'"),
|
|
26676
|
+
vni: z113.number().int().describe("VXLAN Network Identifier (VNI)"),
|
|
26677
|
+
port: z113.number().int().default(8472).describe("UDP port (default 8472)"),
|
|
26678
|
+
local_address: z113.string().optional().describe("Local source IP address"),
|
|
26679
|
+
interface: z113.string().optional().describe("Source interface"),
|
|
26680
|
+
group: z113.string().optional().describe("Multicast group address for broadcast/unknown-unicast flooding"),
|
|
26458
26681
|
vteps_ip_version: VtepsIpVersion.optional().describe("IP version used for VTEP addressing"),
|
|
26459
|
-
mac_address:
|
|
26682
|
+
mac_address: z113.string().optional().describe("MAC address of the VXLAN interface"),
|
|
26460
26683
|
arp: Arp.optional().describe("Address Resolution Protocol mode for the interface"),
|
|
26461
|
-
arp_timeout:
|
|
26462
|
-
max_fdb_size:
|
|
26463
|
-
allow_fast_path:
|
|
26464
|
-
mtu:
|
|
26465
|
-
comment:
|
|
26466
|
-
disabled:
|
|
26684
|
+
arp_timeout: z113.string().optional().describe("ARP entry timeout, e.g. '30s' or 'auto'"),
|
|
26685
|
+
max_fdb_size: z113.number().int().optional().describe("Maximum forwarding database (FDB) size"),
|
|
26686
|
+
allow_fast_path: z113.boolean().optional().describe("Allow FastPath processing for this interface"),
|
|
26687
|
+
mtu: z113.number().int().optional(),
|
|
26688
|
+
comment: z113.string().optional(),
|
|
26689
|
+
disabled: z113.boolean().default(false)
|
|
26467
26690
|
},
|
|
26468
26691
|
async handler(a, ctx) {
|
|
26469
26692
|
ctx.info(`Creating VXLAN tunnel: name=${a.name}, vni=${a.vni}`);
|
|
@@ -26483,7 +26706,7 @@ ${details}` : "VXLAN tunnel creation completed but unable to verify.";
|
|
|
26483
26706
|
annotations: READ,
|
|
26484
26707
|
description: "Lists all VXLAN interfaces (`/interface vxlan print`)." + " Use to inventory existing VXLAN overlays and check their VNI and UDP port assignments." + " Supports optional partial name filter via name_filter." + " For full detail on one interface use get_vxlan_tunnel; for EoIP tunnels use list_eoip_tunnels;" + " for GRE tunnels use list_gre_tunnels; for IPIP tunnels use list_ipip_tunnels." + " Returns name, VNI, port, local-address, MTU, and run-time status for each interface.",
|
|
26485
26708
|
inputSchema: {
|
|
26486
|
-
name_filter:
|
|
26709
|
+
name_filter: z113.string().optional().describe("Partial name match")
|
|
26487
26710
|
},
|
|
26488
26711
|
async handler(a, ctx) {
|
|
26489
26712
|
ctx.info("Listing VXLAN tunnels");
|
|
@@ -26501,7 +26724,7 @@ ${result}`;
|
|
|
26501
26724
|
title: "Get VXLAN Tunnel Interface Detail",
|
|
26502
26725
|
annotations: READ,
|
|
26503
26726
|
description: "Fetches full detail for a single VXLAN interface by name (`/interface vxlan print detail where name=...`)." + " Use to inspect the VNI, UDP port, local-address, source interface, MTU, and status of one VXLAN interface." + " For a summary list of all VXLAN interfaces use list_vxlan_tunnels." + " For EoIP detail use get_eoip_tunnel; for GRE detail use get_gre_tunnel; for IPIP detail use get_ipip_tunnel." + " Returns the complete property set for the named interface, or a not-found message.",
|
|
26504
|
-
inputSchema: { name:
|
|
26727
|
+
inputSchema: { name: z113.string() },
|
|
26505
26728
|
async handler(a, ctx) {
|
|
26506
26729
|
ctx.info(`Getting VXLAN tunnel details: name=${a.name}`);
|
|
26507
26730
|
const result = await executeMikrotikCommand(`/interface vxlan print detail where name="${a.name}"`, ctx);
|
|
@@ -26515,7 +26738,7 @@ ${result}`;
|
|
|
26515
26738
|
title: "Remove VXLAN Tunnel Interface",
|
|
26516
26739
|
annotations: DESTRUCTIVE,
|
|
26517
26740
|
description: "Permanently deletes a VXLAN interface by name (`/interface vxlan remove [find name=...]`)." + " Verifies existence via count-only before removal and returns a not-found message if the interface does not exist." + " This is destructive and immediately severs all L2 overlay traffic using this VNI endpoint." + " For EoIP removal use remove_eoip_tunnel; for GRE use remove_gre_tunnel; for IPIP use remove_ipip_tunnel.",
|
|
26518
|
-
inputSchema: { name:
|
|
26741
|
+
inputSchema: { name: z113.string() },
|
|
26519
26742
|
async handler(a, ctx) {
|
|
26520
26743
|
ctx.info(`Removing VXLAN tunnel: name=${a.name}`);
|
|
26521
26744
|
const count = await executeMikrotikCommand(`/interface vxlan print count-only where name="${a.name}"`, ctx);
|
|
@@ -26530,7 +26753,7 @@ ${result}`;
|
|
|
26530
26753
|
];
|
|
26531
26754
|
|
|
26532
26755
|
// src/tools/user-manager.ts
|
|
26533
|
-
import { z as
|
|
26756
|
+
import { z as z114 } from "zod";
|
|
26534
26757
|
var NOT_AVAILABLE3 = "User Manager is not available on this device (package not installed).";
|
|
26535
26758
|
var userManagerTools = [
|
|
26536
26759
|
defineTool({
|
|
@@ -26554,12 +26777,12 @@ ${result}`;
|
|
|
26554
26777
|
annotations: WRITE_IDEMPOTENT,
|
|
26555
26778
|
description: "Updates the global User Manager daemon configuration (`/user-manager set`) \u2014 toggle the" + " built-in RADIUS server on/off (`enabled`), set the TLS certificate, or enable the" + " profile/payment subsystem (`use_profiles`). Applies changes idempotently to the single" + " global settings entry; returns the full updated settings after applying. For per-user" + " changes use update_user_manager_user; for profile creation use add_user_manager_profile.",
|
|
26556
26779
|
inputSchema: {
|
|
26557
|
-
enabled:
|
|
26558
|
-
certificate:
|
|
26559
|
-
radsec_certificate:
|
|
26560
|
-
accounting_port:
|
|
26561
|
-
authentication_port:
|
|
26562
|
-
use_profiles:
|
|
26780
|
+
enabled: z114.boolean().optional().describe("Enable or disable the User Manager server"),
|
|
26781
|
+
certificate: z114.string().optional().describe("TLS certificate name for RADIUS over TLS"),
|
|
26782
|
+
radsec_certificate: z114.string().optional().describe("Certificate name for RadSec (RADIUS over TLS)"),
|
|
26783
|
+
accounting_port: z114.number().int().optional().describe("UDP port for RADIUS accounting"),
|
|
26784
|
+
authentication_port: z114.number().int().optional().describe("UDP port for RADIUS authentication"),
|
|
26785
|
+
use_profiles: z114.boolean().optional().describe("Enable the profile/payment subsystem")
|
|
26563
26786
|
},
|
|
26564
26787
|
async handler(a, ctx) {
|
|
26565
26788
|
ctx.info("Updating User Manager settings");
|
|
@@ -26583,15 +26806,15 @@ ${details}`;
|
|
|
26583
26806
|
annotations: WRITE,
|
|
26584
26807
|
description: "Creates a new user in the User Manager RADIUS database (`/user-manager user add`) \u2014 for" + " hotspot, PPP, or 802.1X authentication managed by the built-in RADIUS server. Not for" + " local router login accounts; for those use add_user. Supply `name` and `password`;" + " optionally set `group`, `shared_users` (max simultaneous sessions), and custom RADIUS" + " `attributes`. Returns the created user's detail with secrets redacted.",
|
|
26585
26808
|
inputSchema: {
|
|
26586
|
-
name:
|
|
26587
|
-
password:
|
|
26588
|
-
group:
|
|
26589
|
-
shared_users:
|
|
26590
|
-
attributes:
|
|
26591
|
-
caller_id:
|
|
26592
|
-
otp_secret:
|
|
26593
|
-
comment:
|
|
26594
|
-
disabled:
|
|
26809
|
+
name: z114.string().describe("Login name for the user"),
|
|
26810
|
+
password: z114.string().describe("Login password for the user"),
|
|
26811
|
+
group: z114.string().optional(),
|
|
26812
|
+
shared_users: z114.number().int().optional().describe("Max simultaneous sessions"),
|
|
26813
|
+
attributes: z114.string().optional().describe("Custom RADIUS attributes"),
|
|
26814
|
+
caller_id: z114.string().optional().describe("Caller ID the user is restricted to (e.g. MAC)"),
|
|
26815
|
+
otp_secret: z114.string().optional().describe("Base32 OTP shared secret for two-factor auth"),
|
|
26816
|
+
comment: z114.string().optional(),
|
|
26817
|
+
disabled: z114.boolean().default(false)
|
|
26595
26818
|
},
|
|
26596
26819
|
async handler(a, ctx) {
|
|
26597
26820
|
ctx.info(`Adding User Manager user: name=${a.name}`);
|
|
@@ -26613,7 +26836,7 @@ ${redactSecrets(details)}` : "User Manager user creation completed but unable to
|
|
|
26613
26836
|
annotations: READ,
|
|
26614
26837
|
description: "Returns all users in the User Manager RADIUS database (`/user-manager user print`) \u2014 the" + " accounts that authenticate against the built-in RADIUS server for hotspot, PPP, or 802.1X." + " Optionally filter by partial `name_filter`. Not for local router login accounts; for those" + " use list_users. Returns user list with secrets redacted; for full" + " single-user detail use get_user_manager_user.",
|
|
26615
26838
|
inputSchema: {
|
|
26616
|
-
name_filter:
|
|
26839
|
+
name_filter: z114.string().optional().describe("Partial name match")
|
|
26617
26840
|
},
|
|
26618
26841
|
async handler(a, ctx) {
|
|
26619
26842
|
ctx.info("Listing User Manager users");
|
|
@@ -26633,7 +26856,7 @@ ${redactSecrets(result)}`;
|
|
|
26633
26856
|
title: "Get User Manager RADIUS User Detail",
|
|
26634
26857
|
annotations: READ,
|
|
26635
26858
|
description: "Returns full detail for a single User Manager RADIUS user" + " (`/user-manager user print detail where name=`) \u2014 all fields including group," + " shared-users limit, RADIUS attributes, and status, with secrets redacted. Use when you" + " need the complete record for one user by exact name. To browse all users use" + " list_user_manager_users; to modify the record use update_user_manager_user.",
|
|
26636
|
-
inputSchema: { name:
|
|
26859
|
+
inputSchema: { name: z114.string() },
|
|
26637
26860
|
async handler(a, ctx) {
|
|
26638
26861
|
ctx.info(`Getting User Manager user details: name=${a.name}`);
|
|
26639
26862
|
const result = await executeMikrotikCommand(`/user-manager user print detail where name="${a.name}"`, ctx);
|
|
@@ -26650,16 +26873,16 @@ ${redactSecrets(result)}`;
|
|
|
26650
26873
|
annotations: WRITE_IDEMPOTENT,
|
|
26651
26874
|
description: "Modifies an existing User Manager RADIUS user (`/user-manager user set [find name=...]`)" + " \u2014 change name, password, group, shared-users limit, RADIUS attributes, comment, or" + " enabled/disabled state. Locate the user by its current `name` (from" + " list_user_manager_users or get_user_manager_user). Returns the updated record with" + " secrets redacted. To permanently delete the user use remove_user_manager_user.",
|
|
26652
26875
|
inputSchema: {
|
|
26653
|
-
name:
|
|
26654
|
-
new_name:
|
|
26655
|
-
password:
|
|
26656
|
-
group:
|
|
26657
|
-
shared_users:
|
|
26658
|
-
attributes:
|
|
26659
|
-
caller_id:
|
|
26660
|
-
otp_secret:
|
|
26661
|
-
comment:
|
|
26662
|
-
disabled:
|
|
26876
|
+
name: z114.string().describe("Current name of the user to update"),
|
|
26877
|
+
new_name: z114.string().optional(),
|
|
26878
|
+
password: z114.string().optional(),
|
|
26879
|
+
group: z114.string().optional(),
|
|
26880
|
+
shared_users: z114.number().int().optional(),
|
|
26881
|
+
attributes: z114.string().optional(),
|
|
26882
|
+
caller_id: z114.string().optional().describe("Caller ID the user is restricted to (e.g. MAC)"),
|
|
26883
|
+
otp_secret: z114.string().optional().describe("Base32 OTP shared secret for two-factor auth"),
|
|
26884
|
+
comment: z114.string().optional(),
|
|
26885
|
+
disabled: z114.boolean().optional()
|
|
26663
26886
|
},
|
|
26664
26887
|
async handler(a, ctx) {
|
|
26665
26888
|
ctx.info(`Updating User Manager user: name=${a.name}`);
|
|
@@ -26683,7 +26906,7 @@ ${redactSecrets(details)}`;
|
|
|
26683
26906
|
title: "Remove User Manager RADIUS User",
|
|
26684
26907
|
annotations: DESTRUCTIVE,
|
|
26685
26908
|
description: "Permanently deletes a User Manager RADIUS user (`/user-manager user remove [find name=...]`)" + " \u2014 verifies the user exists via count-only check first, then removes them. Does NOT" + " automatically remove the user's profile assignments; check list_user_manager_user_profiles" + " first. To disable without deleting use update_user_manager_user with `disabled=true`.",
|
|
26686
|
-
inputSchema: { name:
|
|
26909
|
+
inputSchema: { name: z114.string() },
|
|
26687
26910
|
async handler(a, ctx) {
|
|
26688
26911
|
ctx.info(`Removing User Manager user: name=${a.name}`);
|
|
26689
26912
|
const count = await executeMikrotikCommand(`/user-manager user print count-only where name="${a.name}"`, ctx);
|
|
@@ -26703,13 +26926,13 @@ ${redactSecrets(details)}`;
|
|
|
26703
26926
|
annotations: WRITE,
|
|
26704
26927
|
description: "Creates a new User Manager service/billing profile (`/user-manager profile add`) \u2014 a named" + " plan template that defines validity period (e.g. '30d'), price, and session override" + " limits (`starts_when`, `override_shared_users`) that can be assigned to users. Profiles are" + " templates only; to link a profile to a specific user use assign_user_manager_profile. For" + " rate/quota constraints attach a limitation (add_user_manager_limitation). Returns the" + " created profile's detail.",
|
|
26705
26928
|
inputSchema: {
|
|
26706
|
-
name:
|
|
26707
|
-
name_for_users:
|
|
26708
|
-
validity:
|
|
26709
|
-
price:
|
|
26710
|
-
starts_when:
|
|
26711
|
-
override_shared_users:
|
|
26712
|
-
comment:
|
|
26929
|
+
name: z114.string().describe("Profile name"),
|
|
26930
|
+
name_for_users: z114.string().optional().describe("Display name shown to users"),
|
|
26931
|
+
validity: z114.string().optional().describe("Validity period, e.g. '30d'"),
|
|
26932
|
+
price: z114.number().optional(),
|
|
26933
|
+
starts_when: z114.enum(["assigned", "first-auth"]).optional(),
|
|
26934
|
+
override_shared_users: z114.string().optional(),
|
|
26935
|
+
comment: z114.string().optional()
|
|
26713
26936
|
},
|
|
26714
26937
|
async handler(a, ctx) {
|
|
26715
26938
|
ctx.info(`Adding User Manager profile: name=${a.name}`);
|
|
@@ -26731,7 +26954,7 @@ ${details}` : "User Manager profile creation completed but unable to verify.";
|
|
|
26731
26954
|
annotations: READ,
|
|
26732
26955
|
description: "Returns all User Manager service/billing profile templates (`/user-manager profile print`)" + " \u2014 the named plans defining validity, price, and session limits. Optionally filter by" + " partial `name_filter`. Not the same as user-profile assignments; to see which profiles" + " are linked to which users use list_user_manager_user_profiles. Returns profile list.",
|
|
26733
26956
|
inputSchema: {
|
|
26734
|
-
name_filter:
|
|
26957
|
+
name_filter: z114.string().optional().describe("Partial name match")
|
|
26735
26958
|
},
|
|
26736
26959
|
async handler(a, ctx) {
|
|
26737
26960
|
ctx.info("Listing User Manager profiles");
|
|
@@ -26751,7 +26974,7 @@ ${result}`;
|
|
|
26751
26974
|
title: "Remove User Manager Service Profile",
|
|
26752
26975
|
annotations: DESTRUCTIVE,
|
|
26753
26976
|
description: "Permanently deletes a User Manager service/billing profile" + " (`/user-manager profile remove [find name=...]`) \u2014 verifies existence via count-only check" + " first, then removes the plan template. Does NOT automatically remove existing user-profile" + " assignments that reference this profile; check list_user_manager_user_profiles before" + " removing to avoid orphaned assignments. For creating a profile use add_user_manager_profile.",
|
|
26754
|
-
inputSchema: { name:
|
|
26977
|
+
inputSchema: { name: z114.string() },
|
|
26755
26978
|
async handler(a, ctx) {
|
|
26756
26979
|
ctx.info(`Removing User Manager profile: name=${a.name}`);
|
|
26757
26980
|
const count = await executeMikrotikCommand(`/user-manager profile print count-only where name="${a.name}"`, ctx);
|
|
@@ -26771,8 +26994,8 @@ ${result}`;
|
|
|
26771
26994
|
annotations: WRITE,
|
|
26772
26995
|
description: "Creates a user-profile assignment in User Manager (`/user-manager user-profile add`) \u2014" + " links an existing service profile plan to a specific user so the user inherits the plan's" + " limits (rate, transfer, validity). Both `user` and `profile` must already exist; to create" + " a user use add_user_manager_user; to create a profile use add_user_manager_profile. To view" + " existing assignments use list_user_manager_user_profiles.",
|
|
26773
26996
|
inputSchema: {
|
|
26774
|
-
user:
|
|
26775
|
-
profile:
|
|
26997
|
+
user: z114.string().describe("User to assign the profile to"),
|
|
26998
|
+
profile: z114.string().describe("Profile to assign")
|
|
26776
26999
|
},
|
|
26777
27000
|
async handler(a, ctx) {
|
|
26778
27001
|
ctx.info(`Assigning profile '${a.profile}' to user '${a.user}'`);
|
|
@@ -26793,7 +27016,7 @@ ${result}`;
|
|
|
26793
27016
|
annotations: READ,
|
|
26794
27017
|
description: "Returns all User Manager user-to-profile assignment records" + " (`/user-manager user-profile print`) \u2014 shows which service profile plan is linked to each" + " user. Optionally filter by partial `user_filter`. Not the same as listing profile" + " definitions; for the plan templates themselves use list_user_manager_profiles. To create an" + " assignment use assign_user_manager_profile.",
|
|
26795
27018
|
inputSchema: {
|
|
26796
|
-
user_filter:
|
|
27019
|
+
user_filter: z114.string().optional().describe("Partial user match")
|
|
26797
27020
|
},
|
|
26798
27021
|
async handler(a, ctx) {
|
|
26799
27022
|
ctx.info("Listing User Manager user-profiles");
|
|
@@ -26814,13 +27037,13 @@ ${result}`;
|
|
|
26814
27037
|
annotations: WRITE,
|
|
26815
27038
|
description: "Registers a new RADIUS client (router or NAS device) in User Manager" + " (`/user-manager router add`) \u2014 the network device that forwards authentication requests to" + " this built-in RADIUS server. Requires a friendly `name`, the client's IP `address`, and a" + " `shared_secret`; optionally set the CoA port. Not related to IP routing; for routing table" + " entries use add_route. Returns the created entry with secrets redacted.",
|
|
26816
27039
|
inputSchema: {
|
|
26817
|
-
name:
|
|
26818
|
-
address:
|
|
26819
|
-
shared_secret:
|
|
26820
|
-
coa_port:
|
|
26821
|
-
protocol:
|
|
26822
|
-
comment:
|
|
26823
|
-
disabled:
|
|
27040
|
+
name: z114.string().describe("Friendly name for the RADIUS client"),
|
|
27041
|
+
address: z114.string().describe("IP address of the RADIUS client"),
|
|
27042
|
+
shared_secret: z114.string().describe("Shared secret for the RADIUS client"),
|
|
27043
|
+
coa_port: z114.number().int().optional().describe("Change-of-Authorization port"),
|
|
27044
|
+
protocol: z114.string().optional().describe("RADIUS transport protocol for this client (e.g. radius, radsec)"),
|
|
27045
|
+
comment: z114.string().optional(),
|
|
27046
|
+
disabled: z114.boolean().default(false)
|
|
26824
27047
|
},
|
|
26825
27048
|
async handler(a, ctx) {
|
|
26826
27049
|
ctx.info(`Adding User Manager router: name=${a.name}, address=${a.address}`);
|
|
@@ -26842,7 +27065,7 @@ ${redactSecrets(details)}` : "User Manager router creation completed but unable
|
|
|
26842
27065
|
annotations: READ,
|
|
26843
27066
|
description: "Returns all RADIUS clients (routers/NAS devices) registered in User Manager" + " (`/user-manager router print`) \u2014 the devices authorized to forward authentication requests" + " to this built-in RADIUS server. Optionally filter by partial `name_filter`. Not related to" + " IP routing; for routing table entries use list_routes. Returns entries with secrets redacted.",
|
|
26844
27067
|
inputSchema: {
|
|
26845
|
-
name_filter:
|
|
27068
|
+
name_filter: z114.string().optional().describe("Partial name match")
|
|
26846
27069
|
},
|
|
26847
27070
|
async handler(a, ctx) {
|
|
26848
27071
|
ctx.info("Listing User Manager routers");
|
|
@@ -26862,7 +27085,7 @@ ${redactSecrets(result)}`;
|
|
|
26862
27085
|
title: "Remove User Manager RADIUS Client (Router/NAS)",
|
|
26863
27086
|
annotations: DESTRUCTIVE,
|
|
26864
27087
|
description: "Permanently removes a RADIUS client (router/NAS) from User Manager" + " (`/user-manager router remove [find name=...]`) \u2014 verifies existence via count-only check" + " first, then deletes the entry. The device will no longer be able to forward authentication" + " requests to this RADIUS server after removal. Not related to IP routing; for routing table" + " management use remove_route.",
|
|
26865
|
-
inputSchema: { name:
|
|
27088
|
+
inputSchema: { name: z114.string() },
|
|
26866
27089
|
async handler(a, ctx) {
|
|
26867
27090
|
ctx.info(`Removing User Manager router: name=${a.name}`);
|
|
26868
27091
|
const count = await executeMikrotikCommand(`/user-manager router print count-only where name="${a.name}"`, ctx);
|
|
@@ -26882,25 +27105,25 @@ ${redactSecrets(result)}`;
|
|
|
26882
27105
|
annotations: WRITE,
|
|
26883
27106
|
description: "Creates a new User Manager limitation template (`/user-manager limitation add`) \u2014 a reusable" + " named set of rate and quota constraints: download rate (`rate_limit_rx`, e.g. '10M')," + " upload rate (`rate_limit_tx`), total transfer cap (`transfer_limit`, e.g. '10G'), and" + " uptime cap (`uptime_limit`, e.g. '1d'). Limitations are templates attached to profiles, not" + " users directly; for service plan templates use add_user_manager_profile. Returns the created" + " limitation's detail.",
|
|
26884
27107
|
inputSchema: {
|
|
26885
|
-
name:
|
|
26886
|
-
rate_limit_rx:
|
|
26887
|
-
rate_limit_tx:
|
|
26888
|
-
rate_limit_min_rx:
|
|
26889
|
-
rate_limit_min_tx:
|
|
26890
|
-
rate_limit_burst_rx:
|
|
26891
|
-
rate_limit_burst_tx:
|
|
26892
|
-
rate_limit_burst_threshold_rx:
|
|
26893
|
-
rate_limit_burst_threshold_tx:
|
|
26894
|
-
rate_limit_burst_time_rx:
|
|
26895
|
-
rate_limit_burst_time_tx:
|
|
26896
|
-
rate_limit_priority:
|
|
26897
|
-
download_limit:
|
|
26898
|
-
upload_limit:
|
|
26899
|
-
transfer_limit:
|
|
26900
|
-
uptime_limit:
|
|
26901
|
-
reset_counters_interval:
|
|
26902
|
-
reset_counters_start_time:
|
|
26903
|
-
comment:
|
|
27108
|
+
name: z114.string().describe("Limitation name"),
|
|
27109
|
+
rate_limit_rx: z114.string().optional().describe("Download rate limit, e.g. '10M'"),
|
|
27110
|
+
rate_limit_tx: z114.string().optional().describe("Upload rate limit, e.g. '10M'"),
|
|
27111
|
+
rate_limit_min_rx: z114.string().optional().describe("Guaranteed (CIR) download rate, e.g. '2M'"),
|
|
27112
|
+
rate_limit_min_tx: z114.string().optional().describe("Guaranteed (CIR) upload rate, e.g. '2M'"),
|
|
27113
|
+
rate_limit_burst_rx: z114.string().optional().describe("Download burst rate, e.g. '20M'"),
|
|
27114
|
+
rate_limit_burst_tx: z114.string().optional().describe("Upload burst rate, e.g. '20M'"),
|
|
27115
|
+
rate_limit_burst_threshold_rx: z114.string().optional().describe("Download burst threshold rate"),
|
|
27116
|
+
rate_limit_burst_threshold_tx: z114.string().optional().describe("Upload burst threshold rate"),
|
|
27117
|
+
rate_limit_burst_time_rx: z114.string().optional().describe("Download burst time, e.g. '10s'"),
|
|
27118
|
+
rate_limit_burst_time_tx: z114.string().optional().describe("Upload burst time, e.g. '10s'"),
|
|
27119
|
+
rate_limit_priority: z114.number().int().optional().describe("Queue priority (1-8)"),
|
|
27120
|
+
download_limit: z114.string().optional().describe("Download transfer cap in bytes, e.g. '5G'"),
|
|
27121
|
+
upload_limit: z114.string().optional().describe("Upload transfer cap in bytes, e.g. '5G'"),
|
|
27122
|
+
transfer_limit: z114.string().optional().describe("Total transfer cap, e.g. '10G'"),
|
|
27123
|
+
uptime_limit: z114.string().optional().describe("Uptime cap, e.g. '1d'"),
|
|
27124
|
+
reset_counters_interval: z114.string().optional().describe("Interval to auto-reset usage counters"),
|
|
27125
|
+
reset_counters_start_time: z114.string().optional().describe("Start time for counter reset interval"),
|
|
27126
|
+
comment: z114.string().optional()
|
|
26904
27127
|
},
|
|
26905
27128
|
async handler(a, ctx) {
|
|
26906
27129
|
ctx.info(`Adding User Manager limitation: name=${a.name}`);
|
|
@@ -26922,7 +27145,7 @@ ${details}` : "User Manager limitation creation completed but unable to verify."
|
|
|
26922
27145
|
annotations: READ,
|
|
26923
27146
|
description: "Returns all User Manager limitation templates (`/user-manager limitation print`) \u2014 the named" + " rate/quota constraint definitions (rate-limit-rx/tx, transfer-limit, uptime-limit) that can" + " be attached to service profiles. Optionally filter by partial `name_filter`. Limitations are" + " distinct from profile plan templates; for those use list_user_manager_profiles.",
|
|
26924
27147
|
inputSchema: {
|
|
26925
|
-
name_filter:
|
|
27148
|
+
name_filter: z114.string().optional().describe("Partial name match")
|
|
26926
27149
|
},
|
|
26927
27150
|
async handler(a, ctx) {
|
|
26928
27151
|
ctx.info("Listing User Manager limitations");
|
|
@@ -26942,7 +27165,7 @@ ${result}`;
|
|
|
26942
27165
|
title: "Remove User Manager Limitation Template",
|
|
26943
27166
|
annotations: DESTRUCTIVE,
|
|
26944
27167
|
description: "Permanently deletes a User Manager limitation template" + " (`/user-manager limitation remove [find name=...]`) \u2014 verifies existence via count-only" + " check first, then removes the constraint definition. Does NOT check whether the limitation" + " is still referenced by any profiles; verify with list_user_manager_profiles before removing" + " to avoid orphaned references. For listing limitations use list_user_manager_limitations.",
|
|
26945
|
-
inputSchema: { name:
|
|
27168
|
+
inputSchema: { name: z114.string() },
|
|
26946
27169
|
async handler(a, ctx) {
|
|
26947
27170
|
ctx.info(`Removing User Manager limitation: name=${a.name}`);
|
|
26948
27171
|
const count = await executeMikrotikCommand(`/user-manager limitation print count-only where name="${a.name}"`, ctx);
|
|
@@ -26962,8 +27185,8 @@ ${result}`;
|
|
|
26962
27185
|
annotations: READ,
|
|
26963
27186
|
description: "Returns User Manager RADIUS accounting session records (`/user-manager session print`) \u2014 the" + " log of authentication and accounting events for users connecting through registered RADIUS" + " clients. Optionally filter by partial `user_filter` or restrict to currently active sessions" + " with `active_only=true`. Returns session data including bytes transferred, uptime, and" + " status. For the user accounts themselves use list_user_manager_users; for registered RADIUS" + " clients use list_user_manager_routers.",
|
|
26964
27187
|
inputSchema: {
|
|
26965
|
-
user_filter:
|
|
26966
|
-
active_only:
|
|
27188
|
+
user_filter: z114.string().optional().describe("Partial user match"),
|
|
27189
|
+
active_only: z114.boolean().default(false).describe("Only show currently active sessions")
|
|
26967
27190
|
},
|
|
26968
27191
|
async handler(a, ctx) {
|
|
26969
27192
|
ctx.info("Listing User Manager sessions");
|
|
@@ -26983,7 +27206,7 @@ ${result}`;
|
|
|
26983
27206
|
];
|
|
26984
27207
|
|
|
26985
27208
|
// src/tools/users.ts
|
|
26986
|
-
import { z as
|
|
27209
|
+
import { z as z115 } from "zod";
|
|
26987
27210
|
var VALID_POLICIES = [
|
|
26988
27211
|
"local",
|
|
26989
27212
|
"telnet",
|
|
@@ -27040,12 +27263,12 @@ var userTools = [
|
|
|
27040
27263
|
annotations: WRITE,
|
|
27041
27264
|
description: "Create a local user account (`/user add`) \u2014 grants interactive access to the router via SSH, Winbox, web, telnet, or API. " + "The `group` parameter (default: `read`) sets permissions; built-in groups are `read`, `write`, `full`; use `add_user_group` to create custom groups. " + "Use `address` to restrict login to a specific IP/subnet. For PPP/dial-in credentials use `create_ppp_secret` instead. " + "Returns the created account's full detail including its `.id`.",
|
|
27042
27265
|
inputSchema: {
|
|
27043
|
-
name:
|
|
27044
|
-
password:
|
|
27045
|
-
group:
|
|
27046
|
-
address:
|
|
27047
|
-
comment:
|
|
27048
|
-
disabled:
|
|
27266
|
+
name: z115.string(),
|
|
27267
|
+
password: z115.string(),
|
|
27268
|
+
group: z115.string().default("read"),
|
|
27269
|
+
address: z115.string().optional(),
|
|
27270
|
+
comment: z115.string().optional(),
|
|
27271
|
+
disabled: z115.boolean().default(false)
|
|
27049
27272
|
},
|
|
27050
27273
|
async handler(a, ctx) {
|
|
27051
27274
|
ctx.info(`Adding user: name=${a.name}, group=${a.group}`);
|
|
@@ -27077,10 +27300,10 @@ ${redactSecrets(details)}`;
|
|
|
27077
27300
|
annotations: READ,
|
|
27078
27301
|
description: "List local router user accounts (`/user print`) \u2014 shows each account's group, address restriction, and enabled/disabled state. " + "Supports optional filters: `name_filter` (name substring match), `group_filter` (exact group name), `disabled_only`. " + "Note: `active_only` is accepted by the schema but is not applied as a filter \u2014 it has no effect on the output. " + "Passwords are redacted from output. For currently logged-in sessions use `get_active_users`. For PPP dial-in secrets use `create_ppp_secret`.",
|
|
27079
27302
|
inputSchema: {
|
|
27080
|
-
name_filter:
|
|
27081
|
-
group_filter:
|
|
27082
|
-
disabled_only:
|
|
27083
|
-
active_only:
|
|
27303
|
+
name_filter: z115.string().optional(),
|
|
27304
|
+
group_filter: z115.string().optional(),
|
|
27305
|
+
disabled_only: z115.boolean().default(false),
|
|
27306
|
+
active_only: z115.boolean().default(false)
|
|
27084
27307
|
},
|
|
27085
27308
|
async handler(a, ctx) {
|
|
27086
27309
|
ctx.info(`Listing users with filters: name=${a.name_filter}, group=${a.group_filter}`);
|
|
@@ -27104,7 +27327,7 @@ ${redactSecrets(result)}`;
|
|
|
27104
27327
|
title: "Get Local User Account Details",
|
|
27105
27328
|
annotations: READ,
|
|
27106
27329
|
description: "Fetch full detail for a single local user account (`/user print detail where name=...`). " + "Identified by login `name`. Passwords are redacted from output. " + "For all accounts use `list_users`; for currently active sessions use `get_active_users`.",
|
|
27107
|
-
inputSchema: { name:
|
|
27330
|
+
inputSchema: { name: z115.string() },
|
|
27108
27331
|
async handler(a, ctx) {
|
|
27109
27332
|
ctx.info(`Getting user details: name=${a.name}`);
|
|
27110
27333
|
const result = await executeMikrotikCommand(`/user print detail where name="${a.name}"`, ctx);
|
|
@@ -27121,13 +27344,13 @@ ${redactSecrets(result)}`;
|
|
|
27121
27344
|
annotations: WRITE_IDEMPOTENT,
|
|
27122
27345
|
description: "Modify a local user account (`/user set [find name=...]`). " + "Can change login name (`new_name`), `password`, `group`, allowed source `address` (pass empty string to remove address restriction), `comment`, or `disabled` state. " + "For toggling enabled/disabled state only, prefer `enable_user` or `disable_user`. " + "Returns the updated user detail with passwords redacted.",
|
|
27123
27346
|
inputSchema: {
|
|
27124
|
-
name:
|
|
27125
|
-
new_name:
|
|
27126
|
-
password:
|
|
27127
|
-
group:
|
|
27128
|
-
address:
|
|
27129
|
-
comment:
|
|
27130
|
-
disabled:
|
|
27347
|
+
name: z115.string(),
|
|
27348
|
+
new_name: z115.string().optional(),
|
|
27349
|
+
password: z115.string().optional(),
|
|
27350
|
+
group: z115.string().optional(),
|
|
27351
|
+
address: z115.string().optional(),
|
|
27352
|
+
comment: z115.string().optional(),
|
|
27353
|
+
disabled: z115.boolean().optional()
|
|
27131
27354
|
},
|
|
27132
27355
|
async handler(a, ctx) {
|
|
27133
27356
|
return runUpdateUser(a, ctx);
|
|
@@ -27138,7 +27361,7 @@ ${redactSecrets(result)}`;
|
|
|
27138
27361
|
title: "Remove Local User Account",
|
|
27139
27362
|
annotations: DESTRUCTIVE,
|
|
27140
27363
|
description: "Permanently delete a local user account (`/user remove [find name=...]`). " + "Refuses to remove the built-in `admin` account. Verifies the user exists before removing. " + "To temporarily block access without deleting use `disable_user`. To end a live session without deleting the account use `disconnect_user`.",
|
|
27141
|
-
inputSchema: { name:
|
|
27364
|
+
inputSchema: { name: z115.string() },
|
|
27142
27365
|
async handler(a, ctx) {
|
|
27143
27366
|
ctx.info(`Removing user: name=${a.name}`);
|
|
27144
27367
|
if (a.name.toLowerCase() === "admin")
|
|
@@ -27157,7 +27380,7 @@ ${redactSecrets(result)}`;
|
|
|
27157
27380
|
title: "Disable Local User Account",
|
|
27158
27381
|
annotations: WRITE_IDEMPOTENT,
|
|
27159
27382
|
description: "Disable a local user account (`/user set [find name=...] disabled=yes`), preventing new logins without deleting the account. " + "To re-enable use `enable_user`. For a full attribute update use `update_user`. To permanently delete the account use `remove_user`.",
|
|
27160
|
-
inputSchema: { name:
|
|
27383
|
+
inputSchema: { name: z115.string() },
|
|
27161
27384
|
async handler(a, ctx) {
|
|
27162
27385
|
return runUpdateUser({ name: a.name, disabled: true }, ctx);
|
|
27163
27386
|
}
|
|
@@ -27167,7 +27390,7 @@ ${redactSecrets(result)}`;
|
|
|
27167
27390
|
title: "Enable Local User Account",
|
|
27168
27391
|
annotations: WRITE_IDEMPOTENT,
|
|
27169
27392
|
description: "Re-enable a previously disabled local user account (`/user set [find name=...] disabled=no`). " + "To disable use `disable_user`. For a full attribute update use `update_user`.",
|
|
27170
|
-
inputSchema: { name:
|
|
27393
|
+
inputSchema: { name: z115.string() },
|
|
27171
27394
|
async handler(a, ctx) {
|
|
27172
27395
|
return runUpdateUser({ name: a.name, disabled: false }, ctx);
|
|
27173
27396
|
}
|
|
@@ -27178,10 +27401,10 @@ ${redactSecrets(result)}`;
|
|
|
27178
27401
|
annotations: WRITE,
|
|
27179
27402
|
description: "Create a custom user group (`/user group add`) that defines a named permission policy for router access. " + "`policy` is a list of permissions to grant from: local, telnet, ssh, ftp, reboot, read, write, policy, test, winbox, password, web, sniff, sensitive, api, romon, dude, tikapp, rest-api. " + "The built-in groups (`read`, `write`, `full`) already exist on the device; this tool does not guard against those names \u2014 attempting to create a group with a duplicate name will be rejected by the device. Assign users to the new group via `add_user` or `update_user`. " + "Returns the created group's full detail.",
|
|
27180
27403
|
inputSchema: {
|
|
27181
|
-
name:
|
|
27182
|
-
policy:
|
|
27183
|
-
skin:
|
|
27184
|
-
comment:
|
|
27404
|
+
name: z115.string(),
|
|
27405
|
+
policy: z115.array(z115.string()),
|
|
27406
|
+
skin: z115.string().optional(),
|
|
27407
|
+
comment: z115.string().optional()
|
|
27185
27408
|
},
|
|
27186
27409
|
async handler(a, ctx) {
|
|
27187
27410
|
ctx.info(`Adding user group: name=${a.name}`);
|
|
@@ -27218,8 +27441,8 @@ ${details}`;
|
|
|
27218
27441
|
annotations: READ,
|
|
27219
27442
|
description: "List all user groups (`/user group print`), including built-in groups (`read`, `write`, `full`) and custom ones, showing their policy sets. " + "Supports optional filters: `name_filter` (name substring), `policy_filter` (policy substring). " + "To see individual user accounts use `list_users`; to see which users belong to a specific group use `list_users` with `group_filter`.",
|
|
27220
27443
|
inputSchema: {
|
|
27221
|
-
name_filter:
|
|
27222
|
-
policy_filter:
|
|
27444
|
+
name_filter: z115.string().optional(),
|
|
27445
|
+
policy_filter: z115.string().optional()
|
|
27223
27446
|
},
|
|
27224
27447
|
async handler(a, ctx) {
|
|
27225
27448
|
ctx.info(`Listing user groups with filters: name=${a.name_filter}`);
|
|
@@ -27241,7 +27464,7 @@ ${result}`;
|
|
|
27241
27464
|
title: "Get User Group Details",
|
|
27242
27465
|
annotations: READ,
|
|
27243
27466
|
description: "Fetch full detail for a single user group (`/user group print detail where name=...`), showing its complete policy list and skin setting. " + "For all groups use `list_user_groups`. To see which users belong to this group use `list_users` with `group_filter`.",
|
|
27244
|
-
inputSchema: { name:
|
|
27467
|
+
inputSchema: { name: z115.string() },
|
|
27245
27468
|
async handler(a, ctx) {
|
|
27246
27469
|
ctx.info(`Getting user group details: name=${a.name}`);
|
|
27247
27470
|
const result = await executeMikrotikCommand(`/user group print detail where name="${a.name}"`, ctx);
|
|
@@ -27258,11 +27481,11 @@ ${result}`;
|
|
|
27258
27481
|
annotations: WRITE_IDEMPOTENT,
|
|
27259
27482
|
description: "Modify a custom user group (`/user group set [find name=...]`). " + "Can change group name (`new_name`), `policy` list, `skin`, or `comment`. " + "Refuses to modify built-in groups (`read`, `write`, `full`). " + "Valid policies: local, telnet, ssh, ftp, reboot, read, write, policy, test, winbox, password, web, sniff, sensitive, api, romon, dude, tikapp, rest-api. " + "Returns the updated group detail.",
|
|
27260
27483
|
inputSchema: {
|
|
27261
|
-
name:
|
|
27262
|
-
new_name:
|
|
27263
|
-
policy:
|
|
27264
|
-
skin:
|
|
27265
|
-
comment:
|
|
27484
|
+
name: z115.string(),
|
|
27485
|
+
new_name: z115.string().optional(),
|
|
27486
|
+
policy: z115.array(z115.string()).optional(),
|
|
27487
|
+
skin: z115.string().optional(),
|
|
27488
|
+
comment: z115.string().optional()
|
|
27266
27489
|
},
|
|
27267
27490
|
async handler(a, ctx) {
|
|
27268
27491
|
ctx.info(`Updating user group: name=${a.name}`);
|
|
@@ -27295,7 +27518,7 @@ ${details}`;
|
|
|
27295
27518
|
title: "Remove User Group",
|
|
27296
27519
|
annotations: DESTRUCTIVE,
|
|
27297
27520
|
description: "Delete a custom user group (`/user group remove [find name=...]`). " + "Refuses to remove built-in groups (`read`, `write`, `full`). " + "Checks that no users are currently assigned to the group \u2014 reassign or remove those users first via `update_user` or `remove_user`. " + "To remove individual user accounts use `remove_user`.",
|
|
27298
|
-
inputSchema: { name:
|
|
27521
|
+
inputSchema: { name: z115.string() },
|
|
27299
27522
|
async handler(a, ctx) {
|
|
27300
27523
|
ctx.info(`Removing user group: name=${a.name}`);
|
|
27301
27524
|
if (BUILTIN_GROUPS.includes(a.name))
|
|
@@ -27333,7 +27556,7 @@ ${result}`;
|
|
|
27333
27556
|
title: "Disconnect Active User Session",
|
|
27334
27557
|
annotations: DESTRUCTIVE,
|
|
27335
27558
|
description: "Forcibly terminate an active user session (`/user active remove <user_id>`). " + "`user_id` is the `.id` from `get_active_users`. " + "Does NOT delete the user account \u2014 to delete the account use `remove_user`. To prevent future logins without deleting use `disable_user`.",
|
|
27336
|
-
inputSchema: { user_id:
|
|
27559
|
+
inputSchema: { user_id: z115.string() },
|
|
27337
27560
|
async handler(a, ctx) {
|
|
27338
27561
|
ctx.info(`Disconnecting user: user_id=${a.user_id}`);
|
|
27339
27562
|
const result = await executeMikrotikCommand(`/user active remove ${a.user_id}`, ctx);
|
|
@@ -27347,7 +27570,7 @@ ${result}`;
|
|
|
27347
27570
|
title: "Export User Configuration to File",
|
|
27348
27571
|
annotations: READ,
|
|
27349
27572
|
description: "Export the router's user accounts and user-group configuration as a RouterOS script (`/user export file=<filename>`). " + "The file is saved on the router's flash storage as `<filename>.rsc`. If `filename` is omitted, defaults to `user_config`. " + "The exported script can be used to restore user accounts on another device.",
|
|
27350
|
-
inputSchema: { filename:
|
|
27573
|
+
inputSchema: { filename: z115.string().optional() },
|
|
27351
27574
|
async handler(a, ctx) {
|
|
27352
27575
|
ctx.info("Exporting user configuration");
|
|
27353
27576
|
const filename = a.filename || "user_config";
|
|
@@ -27363,8 +27586,8 @@ ${result}`;
|
|
|
27363
27586
|
annotations: WRITE,
|
|
27364
27587
|
description: "Import an SSH public key for a user (`/user ssh-keys import user=... public-key-file=...`), enabling key-based SSH authentication in addition to password login. " + "`key_file` must be the path to a public key file already present on the router's filesystem. " + "To list a user's existing keys use `list_user_ssh_keys`; to remove a key use `remove_user_ssh_key`.",
|
|
27365
27588
|
inputSchema: {
|
|
27366
|
-
username:
|
|
27367
|
-
key_file:
|
|
27589
|
+
username: z115.string(),
|
|
27590
|
+
key_file: z115.string()
|
|
27368
27591
|
},
|
|
27369
27592
|
async handler(a, ctx) {
|
|
27370
27593
|
ctx.info(`Setting SSH keys for user: ${a.username}`);
|
|
@@ -27381,7 +27604,7 @@ ${result}`;
|
|
|
27381
27604
|
title: "List User SSH Keys",
|
|
27382
27605
|
annotations: READ,
|
|
27383
27606
|
description: "List SSH public keys registered for a specific user (`/user ssh-keys print where user=...`). " + "Returns each key's `.id`, which is required by `remove_user_ssh_key`. To add a key use `set_user_ssh_keys`.",
|
|
27384
|
-
inputSchema: { username:
|
|
27607
|
+
inputSchema: { username: z115.string() },
|
|
27385
27608
|
async handler(a, ctx) {
|
|
27386
27609
|
ctx.info(`Listing SSH keys for user: ${a.username}`);
|
|
27387
27610
|
const result = await executeMikrotikCommand(`/user ssh-keys print where user="${a.username}"`, ctx);
|
|
@@ -27397,7 +27620,7 @@ ${result}`;
|
|
|
27397
27620
|
title: "Remove User SSH Key",
|
|
27398
27621
|
annotations: DESTRUCTIVE,
|
|
27399
27622
|
description: "Delete a specific SSH public key (`/user ssh-keys remove <key_id>`). " + "`key_id` is the `.id` from `list_user_ssh_keys`. " + "Does NOT disable the user's password-based login \u2014 to block all logins use `disable_user`; to delete the account use `remove_user`.",
|
|
27400
|
-
inputSchema: { key_id:
|
|
27623
|
+
inputSchema: { key_id: z115.string() },
|
|
27401
27624
|
async handler(a, ctx) {
|
|
27402
27625
|
ctx.info(`Removing SSH key: key_id=${a.key_id}`);
|
|
27403
27626
|
const result = await executeMikrotikCommand(`/user ssh-keys remove ${a.key_id}`, ctx);
|
|
@@ -27409,7 +27632,7 @@ ${result}`;
|
|
|
27409
27632
|
];
|
|
27410
27633
|
|
|
27411
27634
|
// src/tools/vlan-designer.ts
|
|
27412
|
-
import { z as
|
|
27635
|
+
import { z as z116 } from "zod";
|
|
27413
27636
|
function defaultRange2(subnet) {
|
|
27414
27637
|
const o = subnet.split("/")[0].split(".");
|
|
27415
27638
|
return `${o[0]}.${o[1]}.${o[2]}.10-${o[0]}.${o[1]}.${o[2]}.254`;
|
|
@@ -27421,18 +27644,18 @@ var vlanDesignerTools = [
|
|
|
27421
27644
|
annotations: DANGEROUS,
|
|
27422
27645
|
description: "Stands up a complete isolated network segment in one call: a VLAN interface on the bridge, its " + "gateway IP, a DHCP server + pool + network, optional internet access (srcnat masquerade), and " + "inter-VLAN isolation firewall rules \u2014 e.g. 'a guest VLAN that reaches the internet but not the " + "LAN'. DEFAULTS TO A DRY RUN (`apply=false`) showing every command grouped; set `apply=true` to " + "build it. Bridge VLAN tagging is added when `tagged_ports`/`untagged_ports` are given (requires " + "bridge vlan-filtering). Isolation drops forward traffic from this subnet to each `isolate_from` " + "subnet. Returns the plan or a build report.",
|
|
27423
27646
|
inputSchema: {
|
|
27424
|
-
vlan_id:
|
|
27425
|
-
name:
|
|
27426
|
-
subnet:
|
|
27427
|
-
gateway:
|
|
27428
|
-
bridge:
|
|
27429
|
-
tagged_ports:
|
|
27430
|
-
untagged_ports:
|
|
27431
|
-
dhcp:
|
|
27432
|
-
dhcp_range:
|
|
27433
|
-
internet:
|
|
27434
|
-
isolate_from:
|
|
27435
|
-
apply:
|
|
27647
|
+
vlan_id: z116.number().int().min(1).max(4094),
|
|
27648
|
+
name: z116.string().describe("Name for the VLAN interface, e.g. 'guest'"),
|
|
27649
|
+
subnet: z116.string().describe("CIDR for the segment, e.g. '192.168.30.0/24'"),
|
|
27650
|
+
gateway: z116.string().describe("Router's address in the segment, e.g. '192.168.30.1'"),
|
|
27651
|
+
bridge: z116.string().default("bridge").describe("Bridge to put the VLAN on"),
|
|
27652
|
+
tagged_ports: z116.string().optional().describe("Comma-separated trunk/tagged ports (+ the bridge)"),
|
|
27653
|
+
untagged_ports: z116.string().optional().describe("Comma-separated access/untagged ports"),
|
|
27654
|
+
dhcp: z116.boolean().default(true).describe("Create a DHCP server + pool for the segment"),
|
|
27655
|
+
dhcp_range: z116.string().optional().describe("Pool range; defaults to .10\u2013.254 of the subnet"),
|
|
27656
|
+
internet: z116.boolean().default(true).describe("Allow internet access via srcnat masquerade"),
|
|
27657
|
+
isolate_from: z116.array(z116.string()).optional().describe("Subnets this segment must NOT reach, e.g. ['192.168.1.0/24']"),
|
|
27658
|
+
apply: z116.boolean().default(false).describe("false = preview (default); true = build")
|
|
27436
27659
|
},
|
|
27437
27660
|
async handler(a, ctx) {
|
|
27438
27661
|
const prefix = a.subnet.split("/")[1] ?? "24";
|
|
@@ -27505,9 +27728,9 @@ Review partial segment (the VLAN may exist without DHCP/firewall).`;
|
|
|
27505
27728
|
];
|
|
27506
27729
|
|
|
27507
27730
|
// src/tools/vlan.ts
|
|
27508
|
-
import { z as
|
|
27509
|
-
var ArpMode2 =
|
|
27510
|
-
var LoopProtect =
|
|
27731
|
+
import { z as z117 } from "zod";
|
|
27732
|
+
var ArpMode2 = z117.enum(["enabled", "disabled", "proxy-arp", "reply-only"]);
|
|
27733
|
+
var LoopProtect = z117.enum(["default", "on", "off"]);
|
|
27511
27734
|
var vlanTools = [
|
|
27512
27735
|
defineTool({
|
|
27513
27736
|
name: "create_vlan_interface",
|
|
@@ -27515,18 +27738,18 @@ var vlanTools = [
|
|
|
27515
27738
|
annotations: WRITE,
|
|
27516
27739
|
description: "Creates an 802.1Q VLAN sub-interface (`/interface vlan`) on a specified parent physical or bridge interface." + " Use this to segment layer-2 traffic by VLAN ID (1\u20134094); set `use_service_tag=true` for 802.1ad QinQ double-tagging." + " For listing existing VLAN interfaces use `list_vlan_interfaces`; for editing an existing VLAN use `update_vlan_interface`." + " Returns the created interface's full detail including its name, which is the identifier accepted by `get_vlan_interface`, `update_vlan_interface`, and `remove_vlan_interface`." + " ARP mode accepts: enabled (default), disabled, proxy-arp, reply-only.",
|
|
27517
27740
|
inputSchema: {
|
|
27518
|
-
name:
|
|
27519
|
-
vlan_id:
|
|
27520
|
-
interface:
|
|
27521
|
-
comment:
|
|
27522
|
-
disabled:
|
|
27523
|
-
mtu:
|
|
27524
|
-
use_service_tag:
|
|
27741
|
+
name: z117.string().describe("Name for the new VLAN interface, e.g. 'vlan100'"),
|
|
27742
|
+
vlan_id: z117.number().int().min(1).max(4094).describe("802.1Q VLAN ID (1-4094)"),
|
|
27743
|
+
interface: z117.string().describe("Parent interface, e.g. 'ether1' or 'bridge'"),
|
|
27744
|
+
comment: z117.string().optional(),
|
|
27745
|
+
disabled: z117.boolean().default(false),
|
|
27746
|
+
mtu: z117.number().int().optional(),
|
|
27747
|
+
use_service_tag: z117.boolean().default(false).describe("Use 802.1ad service tag (QinQ)"),
|
|
27525
27748
|
arp: ArpMode2.default("enabled"),
|
|
27526
|
-
arp_timeout:
|
|
27749
|
+
arp_timeout: z117.string().optional(),
|
|
27527
27750
|
loop_protect: LoopProtect.optional().describe("Loop protection: default, on, off"),
|
|
27528
|
-
loop_protect_disable_time:
|
|
27529
|
-
loop_protect_send_interval:
|
|
27751
|
+
loop_protect_disable_time: z117.string().optional().describe("Time to disable interface on loop detection, e.g. '5m' (0 = forever)"),
|
|
27752
|
+
loop_protect_send_interval: z117.string().optional().describe("Interval between loop-protect probe packets, e.g. '5s'")
|
|
27530
27753
|
},
|
|
27531
27754
|
async handler(a, ctx) {
|
|
27532
27755
|
ctx.info(`Creating VLAN interface: name=${a.name}, vlan_id=${a.vlan_id}, interface=${a.interface}`);
|
|
@@ -27546,10 +27769,10 @@ ${details}` : "VLAN interface creation completed but unable to verify.";
|
|
|
27546
27769
|
annotations: READ,
|
|
27547
27770
|
description: "Lists all 802.1Q VLAN sub-interfaces (`/interface vlan print`) with optional filters by name substring, VLAN ID, parent interface, or disabled state." + " Use to discover existing VLANs and obtain interface names for `get_vlan_interface`, `update_vlan_interface`, or `remove_vlan_interface`." + " For a single interface's full property detail use `get_vlan_interface`." + " Returns a table of matching VLAN interfaces, or a not-found message when no entries match the filters.",
|
|
27548
27771
|
inputSchema: {
|
|
27549
|
-
name_filter:
|
|
27550
|
-
vlan_id_filter:
|
|
27551
|
-
interface_filter:
|
|
27552
|
-
disabled_only:
|
|
27772
|
+
name_filter: z117.string().optional().describe("Partial name match"),
|
|
27773
|
+
vlan_id_filter: z117.number().int().optional(),
|
|
27774
|
+
interface_filter: z117.string().optional().describe("Exact parent interface name"),
|
|
27775
|
+
disabled_only: z117.boolean().default(false)
|
|
27553
27776
|
},
|
|
27554
27777
|
async handler(a, ctx) {
|
|
27555
27778
|
ctx.info("Listing VLAN interfaces");
|
|
@@ -27573,7 +27796,7 @@ ${result}`;
|
|
|
27573
27796
|
title: "Get VLAN Interface Details",
|
|
27574
27797
|
annotations: READ,
|
|
27575
27798
|
description: 'Returns full detail for a single named VLAN interface (`/interface vlan print detail where name="..."`), including VLAN ID, parent interface, ARP mode, MTU, and running state.' + " Use when you already know the exact interface name and need all properties." + " For searching across all VLANs or filtering by parent interface or VLAN ID use `list_vlan_interfaces`.",
|
|
27576
|
-
inputSchema: { name:
|
|
27799
|
+
inputSchema: { name: z117.string() },
|
|
27577
27800
|
async handler(a, ctx) {
|
|
27578
27801
|
ctx.info(`Getting VLAN interface details: name=${a.name}`);
|
|
27579
27802
|
const result = await executeMikrotikCommand(`/interface vlan print detail where name="${a.name}"`, ctx);
|
|
@@ -27588,19 +27811,19 @@ ${result}`;
|
|
|
27588
27811
|
annotations: WRITE_IDEMPOTENT,
|
|
27589
27812
|
description: 'Modifies properties of an existing VLAN sub-interface (`/interface vlan set [find name="..."]`).' + " Accepts any subset of the create parameters; omit fields to leave them unchanged." + " Supply the current `name` from `list_vlan_interfaces` or `get_vlan_interface`; use `new_name` to rename the interface." + " For creating a new VLAN interface use `create_vlan_interface`; to permanently delete use `remove_vlan_interface`." + " Returns the updated interface's full detail after applying the change." + " ARP mode accepts: enabled, disabled, proxy-arp, reply-only.",
|
|
27590
27813
|
inputSchema: {
|
|
27591
|
-
name:
|
|
27592
|
-
new_name:
|
|
27593
|
-
vlan_id:
|
|
27594
|
-
interface:
|
|
27595
|
-
comment:
|
|
27596
|
-
disabled:
|
|
27597
|
-
mtu:
|
|
27598
|
-
use_service_tag:
|
|
27814
|
+
name: z117.string().describe("Current name of the VLAN interface to update"),
|
|
27815
|
+
new_name: z117.string().optional(),
|
|
27816
|
+
vlan_id: z117.number().int().min(1).max(4094).optional(),
|
|
27817
|
+
interface: z117.string().optional(),
|
|
27818
|
+
comment: z117.string().optional(),
|
|
27819
|
+
disabled: z117.boolean().optional(),
|
|
27820
|
+
mtu: z117.number().int().optional(),
|
|
27821
|
+
use_service_tag: z117.boolean().optional(),
|
|
27599
27822
|
arp: ArpMode2.optional(),
|
|
27600
|
-
arp_timeout:
|
|
27823
|
+
arp_timeout: z117.string().optional(),
|
|
27601
27824
|
loop_protect: LoopProtect.optional().describe("Loop protection: default, on, off"),
|
|
27602
|
-
loop_protect_disable_time:
|
|
27603
|
-
loop_protect_send_interval:
|
|
27825
|
+
loop_protect_disable_time: z117.string().optional().describe("Time to disable interface on loop detection, e.g. '5m' (0 = forever)"),
|
|
27826
|
+
loop_protect_send_interval: z117.string().optional().describe("Interval between loop-protect probe packets, e.g. '5s'")
|
|
27604
27827
|
},
|
|
27605
27828
|
async handler(a, ctx) {
|
|
27606
27829
|
ctx.info(`Updating VLAN interface: name=${a.name}`);
|
|
@@ -27622,7 +27845,7 @@ ${details}`;
|
|
|
27622
27845
|
title: "Remove VLAN Interface",
|
|
27623
27846
|
annotations: DESTRUCTIVE,
|
|
27624
27847
|
description: 'Permanently deletes a VLAN sub-interface (`/interface vlan remove [find name="..."]`) after confirming it exists via a count-only check.' + " Supply the interface `name` from `list_vlan_interfaces` or `get_vlan_interface`." + " Removing a VLAN interface also removes IP addresses assigned to it; firewall rules and other configuration that reference it by name are not automatically deleted and will remain as orphaned, ineffective entries." + " To disable a VLAN temporarily without deleting it use `update_vlan_interface` with `disabled=true`.",
|
|
27625
|
-
inputSchema: { name:
|
|
27848
|
+
inputSchema: { name: z117.string() },
|
|
27626
27849
|
async handler(a, ctx) {
|
|
27627
27850
|
ctx.info(`Removing VLAN interface: name=${a.name}`);
|
|
27628
27851
|
const count = await executeMikrotikCommand(`/interface vlan print count-only where name="${a.name}"`, ctx);
|
|
@@ -27637,7 +27860,7 @@ ${details}`;
|
|
|
27637
27860
|
];
|
|
27638
27861
|
|
|
27639
27862
|
// src/tools/wireguard-mesh.ts
|
|
27640
|
-
import { z as
|
|
27863
|
+
import { z as z118 } from "zod";
|
|
27641
27864
|
function meshAddress(prefix, index) {
|
|
27642
27865
|
const [net, len = "24"] = prefix.split("/");
|
|
27643
27866
|
const octets = net.split(".");
|
|
@@ -27654,16 +27877,16 @@ var wireguardMeshTools = [
|
|
|
27654
27877
|
annotations: DANGEROUS,
|
|
27655
27878
|
description: "Stands up a WireGuard VPN across several configured devices in ONE call: ensures a WireGuard " + "interface on each, reads each device's public key, assigns every device a mesh address from " + "`address_prefix`, then wires the peers between routers \u2014 `topology=full-mesh` connects every " + "pair, `hub-spoke` connects the `hub` to each spoke \u2014 distributing public keys automatically. " + "Endpoints default to each device's configured host (override per device via `endpoints`); add " + "each site's LAN subnet via `allowed_lans` to route it through the tunnel. DEFAULTS TO A DRY RUN " + "(`apply=false`) that shows the full plan; set `apply=true` to build it. Operates across " + "MULTIPLE devices, so it is not affected by the single `device` selector. SSH devices only " + "(needs to read public keys). Returns the plan, or a per-device build report.",
|
|
27656
27879
|
inputSchema: {
|
|
27657
|
-
devices:
|
|
27658
|
-
address_prefix:
|
|
27659
|
-
interface:
|
|
27660
|
-
listen_port:
|
|
27661
|
-
topology:
|
|
27662
|
-
hub:
|
|
27663
|
-
endpoints:
|
|
27664
|
-
allowed_lans:
|
|
27665
|
-
persistent_keepalive:
|
|
27666
|
-
apply:
|
|
27880
|
+
devices: z118.array(z118.string()).min(2).describe("Configured device names to include in the mesh (2+)"),
|
|
27881
|
+
address_prefix: z118.string().default("10.20.0.0/24").describe("Mesh subnet; each device gets <prefix>.<index+1> on its WireGuard interface"),
|
|
27882
|
+
interface: z118.string().default("wg-mesh").describe("WireGuard interface name to create/use"),
|
|
27883
|
+
listen_port: z118.number().int().default(13231),
|
|
27884
|
+
topology: z118.enum(["full-mesh", "hub-spoke"]).default("full-mesh"),
|
|
27885
|
+
hub: z118.string().optional().describe("Hub device name (required when topology=hub-spoke)"),
|
|
27886
|
+
endpoints: z118.record(z118.string(), z118.string()).optional().describe('Per-device public endpoint host override, e.g. {"site-a":"a.example.com"}'),
|
|
27887
|
+
allowed_lans: z118.record(z118.string(), z118.string()).optional().describe('Per-device LAN subnet to route through the tunnel, e.g. {"site-a":"192.168.10.0/24"}'),
|
|
27888
|
+
persistent_keepalive: z118.string().default("25s"),
|
|
27889
|
+
apply: z118.boolean().default(false).describe("false = preview the plan (default); true = build")
|
|
27667
27890
|
},
|
|
27668
27891
|
async handler(a, ctx) {
|
|
27669
27892
|
const devices = a.devices;
|
|
@@ -27754,7 +27977,7 @@ Check handshakes per device with get_wireguard_peers / list_wireguard_peers.`;
|
|
|
27754
27977
|
|
|
27755
27978
|
// src/tools/vpn-onboard.ts
|
|
27756
27979
|
import { generateKeyPairSync } from "crypto";
|
|
27757
|
-
import { z as
|
|
27980
|
+
import { z as z119 } from "zod";
|
|
27758
27981
|
function generateWireGuardKeypair() {
|
|
27759
27982
|
const { privateKey, publicKey } = generateKeyPairSync("x25519");
|
|
27760
27983
|
const priv = privateKey.export({ type: "pkcs8", format: "der" });
|
|
@@ -27771,13 +27994,13 @@ var vpnOnboardTools = [
|
|
|
27771
27994
|
annotations: WRITE,
|
|
27772
27995
|
description: "Generates a ready-to-use WireGuard remote-access profile for one user: creates a client " + "keypair, adds the peer to the server `interface` (allowed-address = the client's tunnel IP), " + "reads the server's public key, and returns a complete client .conf to paste into the WireGuard " + "app or a QR generator. The peer is tagged `vpn-user: <user>` so revoke_wireguard_user can remove " + "it. NOTE: the returned config contains the client PRIVATE key (required to connect) \u2014 handle it " + "securely. `endpoint` is the server's public host:port; `allowed_ips` controls split vs full " + "tunnel. SSH devices only. Returns the client config.",
|
|
27773
27996
|
inputSchema: {
|
|
27774
|
-
interface:
|
|
27775
|
-
user:
|
|
27776
|
-
address:
|
|
27777
|
-
endpoint:
|
|
27778
|
-
dns:
|
|
27779
|
-
allowed_ips:
|
|
27780
|
-
keepalive:
|
|
27997
|
+
interface: z119.string().describe("Existing WireGuard SERVER interface, e.g. 'wg-server'"),
|
|
27998
|
+
user: z119.string().describe("User/device label, e.g. 'alice-laptop'"),
|
|
27999
|
+
address: z119.string().describe("Tunnel IP to assign the client, e.g. '10.20.0.50'"),
|
|
28000
|
+
endpoint: z119.string().describe("Server public endpoint host:port, e.g. 'vpn.example.com:13231'"),
|
|
28001
|
+
dns: z119.string().optional().describe("DNS for the client, e.g. '10.20.0.1'"),
|
|
28002
|
+
allowed_ips: z119.string().default("0.0.0.0/0").describe("Client AllowedIPs: '0.0.0.0/0' full-tunnel, or a LAN subnet for split-tunnel"),
|
|
28003
|
+
keepalive: z119.string().default("25").describe("PersistentKeepalive seconds")
|
|
27781
28004
|
},
|
|
27782
28005
|
async handler(a, ctx) {
|
|
27783
28006
|
ctx.info(`Onboarding WireGuard user '${a.user}' on ${a.interface}`);
|
|
@@ -27815,7 +28038,7 @@ ${config}`;
|
|
|
27815
28038
|
title: "Revoke WireGuard Remote User",
|
|
27816
28039
|
annotations: DESTRUCTIVE,
|
|
27817
28040
|
description: "Revokes a remote-access user created by onboard_wireguard_user: removes the WireGuard peer " + "tagged `vpn-user: <user>` from the server, immediately cutting their access. Returns whether a " + "peer was removed.",
|
|
27818
|
-
inputSchema: { user:
|
|
28041
|
+
inputSchema: { user: z119.string().describe("The user label used at onboarding") },
|
|
27819
28042
|
async handler(a, ctx) {
|
|
27820
28043
|
const count = await executeMikrotikCommand(`/interface wireguard peers print count-only where comment="vpn-user: ${a.user}"`, ctx);
|
|
27821
28044
|
if (count.trim() === "0")
|
|
@@ -27829,7 +28052,7 @@ ${config}`;
|
|
|
27829
28052
|
];
|
|
27830
28053
|
|
|
27831
28054
|
// src/tools/wireguard.ts
|
|
27832
|
-
import { z as
|
|
28055
|
+
import { z as z120 } from "zod";
|
|
27833
28056
|
var wireguardTools = [
|
|
27834
28057
|
defineTool({
|
|
27835
28058
|
name: "create_wireguard_interface",
|
|
@@ -27837,12 +28060,12 @@ var wireguardTools = [
|
|
|
27837
28060
|
annotations: WRITE,
|
|
27838
28061
|
description: "Creates a WireGuard tunnel interface (`/interface wireguard`) \u2014 the local VPN endpoint" + " with a UDP listen port and private key. Use this to establish the server-side or site-to-site" + " WireGuard interface before adding remote peers with add_wireguard_peer." + " For IPsec tunnels use create_ipsec_peer; for L2TP use create_l2tp_client;" + " for OpenVPN use create_ovpn_client. Returns the created interface's detail including" + " its name and RouterOS-generated public key.",
|
|
27839
28062
|
inputSchema: {
|
|
27840
|
-
name:
|
|
27841
|
-
listen_port:
|
|
27842
|
-
private_key:
|
|
27843
|
-
mtu:
|
|
27844
|
-
comment:
|
|
27845
|
-
disabled:
|
|
28063
|
+
name: z120.string(),
|
|
28064
|
+
listen_port: z120.number().int().optional(),
|
|
28065
|
+
private_key: z120.string().optional(),
|
|
28066
|
+
mtu: z120.number().int().optional(),
|
|
28067
|
+
comment: z120.string().optional(),
|
|
28068
|
+
disabled: z120.boolean().default(false)
|
|
27846
28069
|
},
|
|
27847
28070
|
async handler(a, ctx) {
|
|
27848
28071
|
ctx.info(`Creating WireGuard interface: name=${a.name}`);
|
|
@@ -27862,9 +28085,9 @@ ${details}` : "WireGuard interface created successfully.";
|
|
|
27862
28085
|
annotations: READ,
|
|
27863
28086
|
description: "`list_wireguard_interfaces` \u2014 READ / list / show / inspect all WireGuard tunnel interfaces" + " (`/interface wireguard print`). The go-to tool to read the current WireGuard state on a" + " device. Returns each interface's name, listen-port, public-key, MTU, and running/disabled" + " status. Filter by name substring (name_filter), disabled-only, or running-only." + " For one interface's full detail use get_wireguard_interface; for the peer table use" + " list_wireguard_peers; for interfaces AND peers in one call use get_wireguard_status.",
|
|
27864
28087
|
inputSchema: {
|
|
27865
|
-
name_filter:
|
|
27866
|
-
disabled_only:
|
|
27867
|
-
running_only:
|
|
28088
|
+
name_filter: z120.string().optional(),
|
|
28089
|
+
disabled_only: z120.boolean().default(false),
|
|
28090
|
+
running_only: z120.boolean().default(false)
|
|
27868
28091
|
},
|
|
27869
28092
|
async handler(a, ctx) {
|
|
27870
28093
|
ctx.info("Listing WireGuard interfaces");
|
|
@@ -27886,7 +28109,7 @@ ${result}`;
|
|
|
27886
28109
|
title: "Get WireGuard Interface Details",
|
|
27887
28110
|
annotations: READ,
|
|
27888
28111
|
description: "`get_wireguard_interface` \u2014 READ / get / show the full detail of ONE WireGuard tunnel interface" + " (`/interface wireguard print detail`) looked up by name. Returns listen-port, private-key," + " public-key, MTU, running state, and comment. To list all interfaces use" + " list_wireguard_interfaces; for that interface's peers use list_wireguard_peers; for" + " interfaces AND peers in one call use get_wireguard_status.",
|
|
27889
|
-
inputSchema: { name:
|
|
28112
|
+
inputSchema: { name: z120.string() },
|
|
27890
28113
|
async handler(a, ctx) {
|
|
27891
28114
|
ctx.info(`Getting WireGuard interface details: name=${a.name}`);
|
|
27892
28115
|
const result = await executeMikrotikCommand(`/interface wireguard print detail where name="${a.name}"`, ctx);
|
|
@@ -27901,7 +28124,7 @@ ${result}`;
|
|
|
27901
28124
|
annotations: READ,
|
|
27902
28125
|
description: "`get_wireguard_status` \u2014 READ the current WireGuard state on a device in ONE call: ALL tunnel" + " interfaces AND ALL peers together. Use this FIRST to inspect / show / check WireGuard before" + " changing anything (e.g. to read public keys, see which side initiates, or confirm the tunnel" + " is up). Interfaces report name, listen-port, public-key, MTU and running state; peers report" + " .id, interface, public-key, allowed-address, endpoint/current-endpoint, last-handshake time" + " and rx/tx bytes. Combines list_wireguard_interfaces + list_wireguard_peers; optionally filter" + " both to one interface with interface_filter.",
|
|
27903
28126
|
inputSchema: {
|
|
27904
|
-
interface_filter:
|
|
28127
|
+
interface_filter: z120.string().optional().describe("Limit to one interface name, e.g. 'wg-mesh'")
|
|
27905
28128
|
},
|
|
27906
28129
|
async handler(a, ctx) {
|
|
27907
28130
|
ctx.info("Reading WireGuard status (interfaces + peers)");
|
|
@@ -27926,13 +28149,13 @@ ${peerBlock}`;
|
|
|
27926
28149
|
annotations: WRITE_IDEMPOTENT,
|
|
27927
28150
|
description: "Modifies settings on an existing WireGuard tunnel interface (`/interface wireguard set [find name=]`)" + " \u2014 rename (new_name), change listen-port, rotate private-key, adjust MTU, or toggle disabled state." + " Only supplied fields are changed; omitted fields are left as-is." + " For updating remote peers use update_wireguard_peer." + " Returns the updated interface's detail.",
|
|
27928
28151
|
inputSchema: {
|
|
27929
|
-
name:
|
|
27930
|
-
new_name:
|
|
27931
|
-
listen_port:
|
|
27932
|
-
private_key:
|
|
27933
|
-
mtu:
|
|
27934
|
-
comment:
|
|
27935
|
-
disabled:
|
|
28152
|
+
name: z120.string(),
|
|
28153
|
+
new_name: z120.string().optional(),
|
|
28154
|
+
listen_port: z120.number().int().optional(),
|
|
28155
|
+
private_key: z120.string().optional(),
|
|
28156
|
+
mtu: z120.number().int().optional(),
|
|
28157
|
+
comment: z120.string().optional(),
|
|
28158
|
+
disabled: z120.boolean().optional()
|
|
27936
28159
|
},
|
|
27937
28160
|
async handler(a, ctx) {
|
|
27938
28161
|
ctx.info(`Updating WireGuard interface: name=${a.name}`);
|
|
@@ -27955,7 +28178,7 @@ ${details}`;
|
|
|
27955
28178
|
title: "Remove WireGuard Interface",
|
|
27956
28179
|
annotations: DESTRUCTIVE,
|
|
27957
28180
|
description: "Permanently deletes a WireGuard tunnel interface (`/interface wireguard remove`) by name." + " Verifies existence first with count-only; removing the interface also removes all its associated peers." + " For removing only a specific peer without touching the interface use remove_wireguard_peer.",
|
|
27958
|
-
inputSchema: { name:
|
|
28181
|
+
inputSchema: { name: z120.string() },
|
|
27959
28182
|
async handler(a, ctx) {
|
|
27960
28183
|
ctx.info(`Removing WireGuard interface: name=${a.name}`);
|
|
27961
28184
|
const count = await executeMikrotikCommand(`/interface wireguard print count-only where name="${a.name}"`, ctx);
|
|
@@ -27972,7 +28195,7 @@ ${details}`;
|
|
|
27972
28195
|
title: "Enable WireGuard Interface",
|
|
27973
28196
|
annotations: WRITE_IDEMPOTENT,
|
|
27974
28197
|
description: "Enables a disabled WireGuard tunnel interface (`/interface wireguard enable`) by name," + " allowing it to accept and establish tunnel connections." + " For enabling a specific peer without affecting the interface use enable_wireguard_peer." + " To undo, use disable_wireguard_interface.",
|
|
27975
|
-
inputSchema: { name:
|
|
28198
|
+
inputSchema: { name: z120.string() },
|
|
27976
28199
|
async handler(a, ctx) {
|
|
27977
28200
|
ctx.info(`Enabling WireGuard interface: name=${a.name}`);
|
|
27978
28201
|
const result = await executeMikrotikCommand(`/interface wireguard enable [find name="${a.name}"]`, ctx);
|
|
@@ -27986,7 +28209,7 @@ ${details}`;
|
|
|
27986
28209
|
title: "Disable WireGuard Interface",
|
|
27987
28210
|
annotations: WRITE_IDEMPOTENT,
|
|
27988
28211
|
description: "Disables a WireGuard tunnel interface (`/interface wireguard disable`) by name," + " stopping all tunnel traffic through it without removing the interface or its peers." + " For disabling only a specific peer use disable_wireguard_peer." + " To re-enable use enable_wireguard_interface.",
|
|
27989
|
-
inputSchema: { name:
|
|
28212
|
+
inputSchema: { name: z120.string() },
|
|
27990
28213
|
async handler(a, ctx) {
|
|
27991
28214
|
ctx.info(`Disabling WireGuard interface: name=${a.name}`);
|
|
27992
28215
|
const result = await executeMikrotikCommand(`/interface wireguard disable [find name="${a.name}"]`, ctx);
|
|
@@ -28006,23 +28229,23 @@ ${details}`;
|
|
|
28006
28229
|
` + ` endpoint_address: remote host IP or hostname e.g. "203.0.113.1" (omit for road-warrior clients that dial in)
|
|
28007
28230
|
` + ' persistent_keepalive: seconds as string e.g. "25"',
|
|
28008
28231
|
inputSchema: {
|
|
28009
|
-
interface:
|
|
28010
|
-
public_key:
|
|
28011
|
-
allowed_address:
|
|
28012
|
-
endpoint_address:
|
|
28013
|
-
endpoint_port:
|
|
28014
|
-
preshared_key:
|
|
28015
|
-
persistent_keepalive:
|
|
28016
|
-
name:
|
|
28017
|
-
private_key:
|
|
28018
|
-
responder:
|
|
28019
|
-
client_address:
|
|
28020
|
-
client_dns:
|
|
28021
|
-
client_endpoint:
|
|
28022
|
-
client_keepalive:
|
|
28023
|
-
client_listen_port:
|
|
28024
|
-
comment:
|
|
28025
|
-
disabled:
|
|
28232
|
+
interface: z120.string(),
|
|
28233
|
+
public_key: z120.string(),
|
|
28234
|
+
allowed_address: z120.string().describe('CIDR, comma-separated for multiple e.g. "10.0.0.2/32" or "10.0.0.0/24,192.168.0.0/24"'),
|
|
28235
|
+
endpoint_address: z120.string().optional().describe('remote host IP or hostname e.g. "203.0.113.1"'),
|
|
28236
|
+
endpoint_port: z120.number().int().optional(),
|
|
28237
|
+
preshared_key: z120.string().optional(),
|
|
28238
|
+
persistent_keepalive: z120.string().optional().describe('seconds as string e.g. "25"'),
|
|
28239
|
+
name: z120.string().optional().describe("optional peer name label"),
|
|
28240
|
+
private_key: z120.string().optional().describe("peer's private key (lets the router generate this peer's client config)"),
|
|
28241
|
+
responder: z120.boolean().optional().describe("only respond to handshakes, never initiate (for road-warrior clients)"),
|
|
28242
|
+
client_address: z120.string().optional().describe("client tunnel address(es) for the generated client config"),
|
|
28243
|
+
client_dns: z120.string().optional().describe("DNS server(s) written into the generated client config"),
|
|
28244
|
+
client_endpoint: z120.string().optional().describe("server endpoint host[:port] written into the generated client config"),
|
|
28245
|
+
client_keepalive: z120.string().optional().describe('client persistent-keepalive for the generated config e.g. "25s"'),
|
|
28246
|
+
client_listen_port: z120.number().int().optional().describe("listen-port written into the generated client config"),
|
|
28247
|
+
comment: z120.string().optional(),
|
|
28248
|
+
disabled: z120.boolean().default(false)
|
|
28026
28249
|
},
|
|
28027
28250
|
async handler(a, ctx) {
|
|
28028
28251
|
ctx.info(`Adding WireGuard peer: interface=${a.interface}, public_key=${a.public_key.slice(0, 12)}...`);
|
|
@@ -28042,8 +28265,8 @@ ${details}` : "WireGuard peer added successfully.";
|
|
|
28042
28265
|
annotations: READ,
|
|
28043
28266
|
description: "`list_wireguard_peers` \u2014 READ / list / show / inspect all WireGuard peers" + " (`/interface wireguard peers print`). Use this to read which peers are configured and" + " whether the tunnel is up (handshake). Returns each peer's .id, interface, public-key," + " allowed-address, endpoint/current-endpoint, last-handshake time, and rx/tx byte counters." + " Filter by interface name (interface_filter) or disabled-only. For the interface table use" + " list_wireguard_interfaces; for one peer's full detail use get_wireguard_peer; for interfaces" + " AND peers in one call use get_wireguard_status. Use the .id from this output with" + " update_wireguard_peer, remove_wireguard_peer, enable_wireguard_peer, or disable_wireguard_peer.",
|
|
28044
28267
|
inputSchema: {
|
|
28045
|
-
interface_filter:
|
|
28046
|
-
disabled_only:
|
|
28268
|
+
interface_filter: z120.string().optional(),
|
|
28269
|
+
disabled_only: z120.boolean().default(false)
|
|
28047
28270
|
},
|
|
28048
28271
|
async handler(a, ctx) {
|
|
28049
28272
|
ctx.info("Listing WireGuard peers");
|
|
@@ -28067,7 +28290,7 @@ ${result}`;
|
|
|
28067
28290
|
` + `Notes:
|
|
28068
28291
|
` + ' peer_id: the .id from list_wireguard_peers, format "*N" or "N" e.g. "*2"',
|
|
28069
28292
|
inputSchema: {
|
|
28070
|
-
peer_id:
|
|
28293
|
+
peer_id: z120.string().describe('"*N" or "N" from list output e.g. "*2"')
|
|
28071
28294
|
},
|
|
28072
28295
|
async handler(a, ctx) {
|
|
28073
28296
|
ctx.info(`Getting WireGuard peer details: peer_id=${a.peer_id}`);
|
|
@@ -28089,22 +28312,22 @@ ${result}`;
|
|
|
28089
28312
|
` + ` persistent_keepalive: seconds as string e.g. "25"
|
|
28090
28313
|
` + ' Pass "" for endpoint_address or preshared_key to clear them.',
|
|
28091
28314
|
inputSchema: {
|
|
28092
|
-
peer_id:
|
|
28093
|
-
allowed_address:
|
|
28094
|
-
endpoint_address:
|
|
28095
|
-
endpoint_port:
|
|
28096
|
-
preshared_key:
|
|
28097
|
-
persistent_keepalive:
|
|
28098
|
-
name:
|
|
28099
|
-
private_key:
|
|
28100
|
-
responder:
|
|
28101
|
-
client_address:
|
|
28102
|
-
client_dns:
|
|
28103
|
-
client_endpoint:
|
|
28104
|
-
client_keepalive:
|
|
28105
|
-
client_listen_port:
|
|
28106
|
-
comment:
|
|
28107
|
-
disabled:
|
|
28315
|
+
peer_id: z120.string().describe('"*N" or "N" from list output e.g. "*2"'),
|
|
28316
|
+
allowed_address: z120.string().optional(),
|
|
28317
|
+
endpoint_address: z120.string().optional(),
|
|
28318
|
+
endpoint_port: z120.number().int().optional(),
|
|
28319
|
+
preshared_key: z120.string().optional(),
|
|
28320
|
+
persistent_keepalive: z120.string().optional(),
|
|
28321
|
+
name: z120.string().optional().describe("optional peer name label"),
|
|
28322
|
+
private_key: z120.string().optional().describe("peer's private key (lets the router generate this peer's client config)"),
|
|
28323
|
+
responder: z120.boolean().optional().describe("only respond to handshakes, never initiate"),
|
|
28324
|
+
client_address: z120.string().optional().describe("client tunnel address(es) for the generated client config"),
|
|
28325
|
+
client_dns: z120.string().optional().describe("DNS server(s) written into the generated client config"),
|
|
28326
|
+
client_endpoint: z120.string().optional().describe("server endpoint host[:port] written into the generated client config"),
|
|
28327
|
+
client_keepalive: z120.string().optional().describe('client persistent-keepalive for the generated config e.g. "25s"'),
|
|
28328
|
+
client_listen_port: z120.number().int().optional().describe("listen-port written into the generated client config"),
|
|
28329
|
+
comment: z120.string().optional(),
|
|
28330
|
+
disabled: z120.boolean().optional()
|
|
28108
28331
|
},
|
|
28109
28332
|
async handler(a, ctx) {
|
|
28110
28333
|
ctx.info(`Updating WireGuard peer: peer_id=${a.peer_id}`);
|
|
@@ -28130,7 +28353,7 @@ ${details}`;
|
|
|
28130
28353
|
` + `Notes:
|
|
28131
28354
|
` + ' peer_id: the .id from list_wireguard_peers, format "*N" or "N" e.g. "*2"',
|
|
28132
28355
|
inputSchema: {
|
|
28133
|
-
peer_id:
|
|
28356
|
+
peer_id: z120.string().describe('"*N" or "N" from list output e.g. "*2"')
|
|
28134
28357
|
},
|
|
28135
28358
|
async handler(a, ctx) {
|
|
28136
28359
|
ctx.info(`Removing WireGuard peer: peer_id=${a.peer_id}`);
|
|
@@ -28152,7 +28375,7 @@ ${details}`;
|
|
|
28152
28375
|
` + `Notes:
|
|
28153
28376
|
` + ' peer_id: the .id from list_wireguard_peers, format "*N" or "N" e.g. "*2"',
|
|
28154
28377
|
inputSchema: {
|
|
28155
|
-
peer_id:
|
|
28378
|
+
peer_id: z120.string().describe('"*N" or "N" from list output e.g. "*2"')
|
|
28156
28379
|
},
|
|
28157
28380
|
async handler(a, ctx) {
|
|
28158
28381
|
ctx.info(`Enabling WireGuard peer: peer_id=${a.peer_id}`);
|
|
@@ -28171,7 +28394,7 @@ ${details}`;
|
|
|
28171
28394
|
` + `Notes:
|
|
28172
28395
|
` + ' peer_id: the .id from list_wireguard_peers, format "*N" or "N" e.g. "*2"',
|
|
28173
28396
|
inputSchema: {
|
|
28174
|
-
peer_id:
|
|
28397
|
+
peer_id: z120.string().describe('"*N" or "N" from list output e.g. "*2"')
|
|
28175
28398
|
},
|
|
28176
28399
|
async handler(a, ctx) {
|
|
28177
28400
|
ctx.info(`Disabling WireGuard peer: peer_id=${a.peer_id}`);
|
|
@@ -28191,14 +28414,14 @@ ${details}`;
|
|
|
28191
28414
|
` + ` allowed_ips: CIDRs routed through the tunnel by the client, default "0.0.0.0/0" (all IPv4 traffic; add ::/0 to also route IPv6)
|
|
28192
28415
|
` + " persistent_keepalive: seconds integer, default 25",
|
|
28193
28416
|
inputSchema: {
|
|
28194
|
-
client_private_key:
|
|
28195
|
-
client_address:
|
|
28196
|
-
server_public_key:
|
|
28197
|
-
server_endpoint:
|
|
28198
|
-
server_port:
|
|
28199
|
-
allowed_ips:
|
|
28200
|
-
dns:
|
|
28201
|
-
persistent_keepalive:
|
|
28417
|
+
client_private_key: z120.string(),
|
|
28418
|
+
client_address: z120.string(),
|
|
28419
|
+
server_public_key: z120.string(),
|
|
28420
|
+
server_endpoint: z120.string(),
|
|
28421
|
+
server_port: z120.number().int().default(51820),
|
|
28422
|
+
allowed_ips: z120.string().default("0.0.0.0/0"),
|
|
28423
|
+
dns: z120.string().optional(),
|
|
28424
|
+
persistent_keepalive: z120.number().int().default(25)
|
|
28202
28425
|
},
|
|
28203
28426
|
async handler(a, ctx) {
|
|
28204
28427
|
ctx.info("Generating WireGuard client configuration");
|
|
@@ -28232,7 +28455,7 @@ ${details}`;
|
|
|
28232
28455
|
];
|
|
28233
28456
|
|
|
28234
28457
|
// src/tools/wireless.ts
|
|
28235
|
-
import { z as
|
|
28458
|
+
import { z as z121 } from "zod";
|
|
28236
28459
|
var V7_WIFI = ["/interface wifi", "/interface wifiwave2"];
|
|
28237
28460
|
function commandUnsupported2(result) {
|
|
28238
28461
|
const t = result.toLowerCase();
|
|
@@ -28263,12 +28486,12 @@ var wirelessTools = [
|
|
|
28263
28486
|
annotations: WRITE,
|
|
28264
28487
|
description: "Creates a wireless interface (`/interface wifi`, `/interface wifiwave2`, `/interface wireless`, or `/interface wlan` \u2014 auto-detected per device). " + "Use to add a new AP or station interface to the device. " + "On RouterOS v7 accepts name, ssid, disabled, and comment; on v6/legacy also requires radio_name (e.g. `wlan1`) and optionally accepts mode (default `ap-bridge`), frequency, band, channel_width, and security_profile. " + "To modify an existing interface use update_wireless_interface; to see current interfaces use list_wireless_interfaces. " + "Returns the created interface's full detail print including its `.id`.",
|
|
28265
28488
|
inputSchema: {
|
|
28266
|
-
name:
|
|
28267
|
-
ssid:
|
|
28268
|
-
disabled:
|
|
28269
|
-
comment:
|
|
28270
|
-
radio_name:
|
|
28271
|
-
mode:
|
|
28489
|
+
name: z121.string(),
|
|
28490
|
+
ssid: z121.string().optional(),
|
|
28491
|
+
disabled: z121.boolean().default(false),
|
|
28492
|
+
comment: z121.string().optional(),
|
|
28493
|
+
radio_name: z121.string().optional().describe("Required for legacy wireless systems, e.g. 'wlan1'"),
|
|
28494
|
+
mode: z121.enum([
|
|
28272
28495
|
"ap-bridge",
|
|
28273
28496
|
"bridge",
|
|
28274
28497
|
"station",
|
|
@@ -28278,8 +28501,8 @@ var wirelessTools = [
|
|
|
28278
28501
|
"ap-bridge-wds",
|
|
28279
28502
|
"alignment-only"
|
|
28280
28503
|
]).optional(),
|
|
28281
|
-
frequency:
|
|
28282
|
-
band:
|
|
28504
|
+
frequency: z121.string().optional(),
|
|
28505
|
+
band: z121.enum([
|
|
28283
28506
|
"2ghz-b",
|
|
28284
28507
|
"2ghz-b/g",
|
|
28285
28508
|
"2ghz-b/g/n",
|
|
@@ -28291,24 +28514,24 @@ var wirelessTools = [
|
|
|
28291
28514
|
"5ghz-n",
|
|
28292
28515
|
"5ghz-ac"
|
|
28293
28516
|
]).optional(),
|
|
28294
|
-
channel_width:
|
|
28295
|
-
security_profile:
|
|
28296
|
-
mtu:
|
|
28297
|
-
arp:
|
|
28298
|
-
hide_ssid:
|
|
28299
|
-
wireless_protocol:
|
|
28300
|
-
scan_list:
|
|
28301
|
-
frequency_mode:
|
|
28302
|
-
country:
|
|
28303
|
-
antenna_gain:
|
|
28304
|
-
wds_mode:
|
|
28305
|
-
wds_default_bridge:
|
|
28306
|
-
default_authentication:
|
|
28307
|
-
default_forwarding:
|
|
28308
|
-
tx_power:
|
|
28309
|
-
tx_power_mode:
|
|
28310
|
-
distance:
|
|
28311
|
-
disconnect_timeout:
|
|
28517
|
+
channel_width: z121.enum(["20mhz", "40mhz", "80mhz", "160mhz", "20/40mhz-eC", "20/40mhz-Ce"]).optional(),
|
|
28518
|
+
security_profile: z121.string().optional(),
|
|
28519
|
+
mtu: z121.number().int().optional().describe("Interface MTU in bytes"),
|
|
28520
|
+
arp: z121.enum(["disabled", "enabled", "proxy-arp", "reply-only", "local-proxy-arp"]).optional().describe("ARP mode for the interface"),
|
|
28521
|
+
hide_ssid: z121.boolean().optional().describe("Legacy: do not broadcast the SSID in beacons (AP modes)"),
|
|
28522
|
+
wireless_protocol: z121.string().optional().describe("Legacy: wireless protocol, e.g. '802.11', 'nv2', 'nstreme'"),
|
|
28523
|
+
scan_list: z121.string().optional().describe("Legacy: frequencies/ranges to scan (e.g. 'default' or '5180-5320')"),
|
|
28524
|
+
frequency_mode: z121.enum(["manual-txpower", "regulatory-domain", "superchannel"]).optional().describe("Legacy: regulatory frequency mode"),
|
|
28525
|
+
country: z121.string().optional().describe("Legacy: regulatory country setting (e.g. 'united states')"),
|
|
28526
|
+
antenna_gain: z121.number().int().optional().describe("Legacy: antenna gain in dBi used for tx-power calculations"),
|
|
28527
|
+
wds_mode: z121.enum(["disabled", "dynamic", "dynamic-mesh", "static", "static-mesh"]).optional().describe("Legacy: WDS mode"),
|
|
28528
|
+
wds_default_bridge: z121.string().optional().describe("Legacy: bridge that dynamic WDS interfaces are added to"),
|
|
28529
|
+
default_authentication: z121.boolean().optional().describe("Legacy: allow clients not in the access-list to authenticate"),
|
|
28530
|
+
default_forwarding: z121.boolean().optional().describe("Legacy: allow client-to-client forwarding by default"),
|
|
28531
|
+
tx_power: z121.number().int().optional().describe("Legacy: manual transmit power in dBm"),
|
|
28532
|
+
tx_power_mode: z121.enum(["default", "card-rates", "all-rates-fixed", "manual-table"]).optional().describe("Legacy: how tx-power is determined"),
|
|
28533
|
+
distance: z121.string().optional().describe("Legacy: link distance ('dynamic', 'indoors', or a km value)"),
|
|
28534
|
+
disconnect_timeout: z121.string().optional().describe("Legacy: time before a non-responding client is disconnected")
|
|
28312
28535
|
},
|
|
28313
28536
|
async handler(a, ctx) {
|
|
28314
28537
|
ctx.info(`Creating wireless interface: name=${a.name}, ssid=${a.ssid}`);
|
|
@@ -28340,9 +28563,9 @@ ${details}`;
|
|
|
28340
28563
|
annotations: READ,
|
|
28341
28564
|
description: "Lists all wireless interfaces (`/interface wifi`, `/interface wifiwave2`, `/interface wireless`, `/interface wlan`) \u2014 probes every supported command path and aggregates results. " + "Filters by name_filter (substring match), disabled_only, or running_only. " + "For full property detail on a single interface use get_wireless_interface; to see currently connected clients use get_wireless_registration_table. " + "Falls back to `/interface print` with debugging info when no wireless interfaces match, to help identify the correct path on the device.",
|
|
28342
28565
|
inputSchema: {
|
|
28343
|
-
name_filter:
|
|
28344
|
-
disabled_only:
|
|
28345
|
-
running_only:
|
|
28566
|
+
name_filter: z121.string().optional(),
|
|
28567
|
+
disabled_only: z121.boolean().default(false),
|
|
28568
|
+
running_only: z121.boolean().default(false)
|
|
28346
28569
|
},
|
|
28347
28570
|
async handler(a, ctx) {
|
|
28348
28571
|
ctx.info(`Listing wireless interfaces with filters: name=${a.name_filter}`);
|
|
@@ -28396,7 +28619,7 @@ NOTE: If you see wireless interfaces above, they might be using a different comm
|
|
|
28396
28619
|
title: "Get Wireless Interface Details",
|
|
28397
28620
|
annotations: READ,
|
|
28398
28621
|
description: "Retrieves the full detail of one named wireless interface (`<auto-detected path> print detail where name=...`), " + "probing `/interface wifi`, `/interface wifiwave2`, `/interface wireless`, and `/interface wlan` in order. " + "Use when you need all properties of a single interface; for a summary of all interfaces use list_wireless_interfaces. " + "Returns the complete property set for the named interface, or an error if not found.",
|
|
28399
|
-
inputSchema: { name:
|
|
28622
|
+
inputSchema: { name: z121.string() },
|
|
28400
28623
|
async handler(a, ctx) {
|
|
28401
28624
|
ctx.info(`Getting wireless interface details: name=${a.name}`);
|
|
28402
28625
|
const interfaceType = await detectWirelessInterfaceType(ctx);
|
|
@@ -28415,7 +28638,7 @@ ${result}`;
|
|
|
28415
28638
|
title: "Remove Wireless Interface",
|
|
28416
28639
|
annotations: DESTRUCTIVE,
|
|
28417
28640
|
description: "Permanently deletes a named wireless interface (`<auto-detected path> remove [find name=...]`). " + "Verifies the interface exists first (count-only check) and returns an error if not found. " + "This action is irreversible \u2014 to keep the interface but stop traffic use disable_wireless_interface; " + "for property changes only use update_wireless_interface.",
|
|
28418
|
-
inputSchema: { name:
|
|
28641
|
+
inputSchema: { name: z121.string() },
|
|
28419
28642
|
async handler(a, ctx) {
|
|
28420
28643
|
ctx.info(`Removing wireless interface: name=${a.name}`);
|
|
28421
28644
|
const interfaceType = await detectWirelessInterfaceType(ctx);
|
|
@@ -28435,7 +28658,7 @@ ${result}`;
|
|
|
28435
28658
|
title: "Enable Wireless Interface",
|
|
28436
28659
|
annotations: WRITE_IDEMPOTENT,
|
|
28437
28660
|
description: "Enables a named wireless interface that is currently disabled (`<auto-detected path> enable [find name=...]`). " + "Idempotent \u2014 safe to call on an already-enabled interface. " + "For the reverse operation use disable_wireless_interface; to change other settings at the same time use update_wireless_interface. " + "Obtain the interface name from list_wireless_interfaces.",
|
|
28438
|
-
inputSchema: { name:
|
|
28661
|
+
inputSchema: { name: z121.string() },
|
|
28439
28662
|
async handler(a, ctx) {
|
|
28440
28663
|
ctx.info(`Enabling wireless interface: ${a.name}`);
|
|
28441
28664
|
const interfaceType = await detectWirelessInterfaceType(ctx);
|
|
@@ -28452,7 +28675,7 @@ ${result}`;
|
|
|
28452
28675
|
title: "Disable Wireless Interface",
|
|
28453
28676
|
annotations: WRITE_IDEMPOTENT,
|
|
28454
28677
|
description: "Disables a named wireless interface without removing it (`<auto-detected path> disable [find name=...]`). " + "Idempotent \u2014 safe to call on an already-disabled interface. " + "For the reverse operation use enable_wireless_interface; to delete the interface permanently use remove_wireless_interface. " + "Obtain the interface name from list_wireless_interfaces.",
|
|
28455
|
-
inputSchema: { name:
|
|
28678
|
+
inputSchema: { name: z121.string() },
|
|
28456
28679
|
async handler(a, ctx) {
|
|
28457
28680
|
ctx.info(`Disabling wireless interface: ${a.name}`);
|
|
28458
28681
|
const interfaceType = await detectWirelessInterfaceType(ctx);
|
|
@@ -28470,8 +28693,8 @@ ${result}`;
|
|
|
28470
28693
|
annotations: READ,
|
|
28471
28694
|
description: "Scans for visible nearby wireless networks/SSIDs/APs in range (`<auto-detected path> scan <interface> duration=<n>`). " + "Use to discover external networks \u2014 not to list connected clients. " + "For currently associated client stations use get_wireless_registration_table instead. " + "`interface` is the local wireless interface name to scan from (e.g. `wlan1`); `duration` is scan time in seconds (default 5). " + "Returns raw scan output from the device.",
|
|
28472
28695
|
inputSchema: {
|
|
28473
|
-
interface:
|
|
28474
|
-
duration:
|
|
28696
|
+
interface: z121.string(),
|
|
28697
|
+
duration: z121.number().int().default(5)
|
|
28475
28698
|
},
|
|
28476
28699
|
async handler(a, ctx) {
|
|
28477
28700
|
ctx.info(`Scanning wireless networks on interface: ${a.interface}`);
|
|
@@ -28493,7 +28716,7 @@ ${result}`;
|
|
|
28493
28716
|
annotations: READ,
|
|
28494
28717
|
description: "Retrieves the wireless registration table \u2014 the list of client stations currently associated to this AP (`<auto-detected path> registration-table print [where interface=...]`). " + "Each row is an actively connected wireless client with its MAC address, signal strength, and statistics. " + "To discover nearby external APs/SSIDs instead use scan_wireless_networks. " + "Optionally filter by interface name; omit to return all clients across all wireless interfaces.",
|
|
28495
28718
|
inputSchema: {
|
|
28496
|
-
interface:
|
|
28719
|
+
interface: z121.string().optional()
|
|
28497
28720
|
},
|
|
28498
28721
|
async handler(a, ctx) {
|
|
28499
28722
|
ctx.info(`Getting wireless registration table for interface: ${a.interface}`);
|
|
@@ -28555,7 +28778,7 @@ For legacy systems:
|
|
|
28555
28778
|
title: "Create Wireless Security Profile (Legacy v6 Only \u2014 Not Implemented)",
|
|
28556
28779
|
annotations: WRITE,
|
|
28557
28780
|
description: "Stub for creating a `/interface wireless security-profiles` entry \u2014 a RouterOS v6 concept that does not exist in v7. " + "On RouterOS v7 devices (`/interface wifi` or `/interface wifiwave2`) always returns a not-supported message; security is configured directly on the interface. " + "On v6 this is also not implemented and returns an error. " + "For v6 interface creation with a security profile use create_wireless_interface (security_profile arg); for v7, security is configured directly on the interface but is not exposed by this server's wireless tools.",
|
|
28558
|
-
inputSchema: { name:
|
|
28781
|
+
inputSchema: { name: z121.string() },
|
|
28559
28782
|
async handler(_a, ctx) {
|
|
28560
28783
|
const interfaceType = await detectWirelessInterfaceType(ctx);
|
|
28561
28784
|
if (interfaceType && V7_WIFI.includes(interfaceType)) {
|
|
@@ -28582,7 +28805,7 @@ For legacy systems:
|
|
|
28582
28805
|
title: "Get Wireless Security Profile (Legacy v6 Only \u2014 Not Implemented)",
|
|
28583
28806
|
annotations: READ,
|
|
28584
28807
|
description: "Stub for retrieving a named `/interface wireless security-profiles` entry \u2014 a RouterOS v6 concept that does not exist in v7. " + "On RouterOS v7 devices always returns a not-supported message; on v6 also not implemented. " + "Use get_wireless_interface to inspect the security settings on a v7 wireless interface instead.",
|
|
28585
|
-
inputSchema: { name:
|
|
28808
|
+
inputSchema: { name: z121.string() },
|
|
28586
28809
|
async handler(_a, ctx) {
|
|
28587
28810
|
const interfaceType = await detectWirelessInterfaceType(ctx);
|
|
28588
28811
|
if (interfaceType && V7_WIFI.includes(interfaceType)) {
|
|
@@ -28596,7 +28819,7 @@ For legacy systems:
|
|
|
28596
28819
|
title: "Remove Wireless Security Profile (Legacy v6 Only \u2014 Not Implemented)",
|
|
28597
28820
|
annotations: DESTRUCTIVE,
|
|
28598
28821
|
description: "Stub for deleting a named `/interface wireless security-profiles` entry \u2014 a RouterOS v6 concept that does not exist in v7. " + "On RouterOS v7 devices always returns a not-supported message; on v6 also not implemented. " + "To delete a wireless interface entirely use remove_wireless_interface; to change security settings use update_wireless_interface.",
|
|
28599
|
-
inputSchema: { name:
|
|
28822
|
+
inputSchema: { name: z121.string() },
|
|
28600
28823
|
async handler(_a, ctx) {
|
|
28601
28824
|
const interfaceType = await detectWirelessInterfaceType(ctx);
|
|
28602
28825
|
if (interfaceType && V7_WIFI.includes(interfaceType)) {
|
|
@@ -28611,8 +28834,8 @@ For legacy systems:
|
|
|
28611
28834
|
annotations: WRITE,
|
|
28612
28835
|
description: "Stub for assigning a named security profile to a v6 `/interface wireless` interface \u2014 a RouterOS v6 concept that does not exist in v7. " + "On RouterOS v7 devices always returns a not-supported message because security is set directly on the interface. " + "On v6 also not implemented. " + "To update a wireless interface's settings on supported versions use update_wireless_interface.",
|
|
28613
28836
|
inputSchema: {
|
|
28614
|
-
interface_name:
|
|
28615
|
-
security_profile:
|
|
28837
|
+
interface_name: z121.string(),
|
|
28838
|
+
security_profile: z121.string()
|
|
28616
28839
|
},
|
|
28617
28840
|
async handler(_a, ctx) {
|
|
28618
28841
|
const interfaceType = await detectWirelessInterfaceType(ctx);
|
|
@@ -28653,7 +28876,7 @@ For legacy systems:
|
|
|
28653
28876
|
title: "Remove Wireless Access List Entry (Legacy v6 Only \u2014 Not Implemented)",
|
|
28654
28877
|
annotations: DESTRUCTIVE,
|
|
28655
28878
|
description: "Stub for removing a `/interface wireless access-list` entry by ID \u2014 a RouterOS v6 concept. " + "On RouterOS v7 devices always returns a not-supported message; on v6 also not implemented. " + "The entry_id would take the `.id` from list_wireless_access_list if that were implemented. " + "For v7 access control use list_filter_rules and remove_filter_rule instead.",
|
|
28656
|
-
inputSchema: { entry_id:
|
|
28879
|
+
inputSchema: { entry_id: z121.string() },
|
|
28657
28880
|
async handler(_a, ctx) {
|
|
28658
28881
|
const interfaceType = await detectWirelessInterfaceType(ctx);
|
|
28659
28882
|
if (interfaceType && V7_WIFI.includes(interfaceType)) {
|
|
@@ -28668,31 +28891,31 @@ For legacy systems:
|
|
|
28668
28891
|
annotations: WRITE_IDEMPOTENT,
|
|
28669
28892
|
description: "Updates settings on an existing named wireless interface (`<auto-detected path> set [find name=...] ...`). " + "Supports renaming (new_name), changing SSID, toggling disabled state, and updating comment. " + "Verifies the interface exists before applying; returns 'No updates specified.' if no optional fields are provided. " + "To only enable or disable the interface prefer enable_wireless_interface or disable_wireless_interface; " + "to create a new interface use create_wireless_interface; to delete one use remove_wireless_interface. " + "Returns the updated interface's full detail print.",
|
|
28670
28893
|
inputSchema: {
|
|
28671
|
-
name:
|
|
28672
|
-
new_name:
|
|
28673
|
-
ssid:
|
|
28674
|
-
disabled:
|
|
28675
|
-
comment:
|
|
28676
|
-
mtu:
|
|
28677
|
-
arp:
|
|
28678
|
-
hide_ssid:
|
|
28679
|
-
wireless_protocol:
|
|
28680
|
-
scan_list:
|
|
28681
|
-
frequency:
|
|
28682
|
-
band:
|
|
28683
|
-
channel_width:
|
|
28684
|
-
frequency_mode:
|
|
28685
|
-
country:
|
|
28686
|
-
antenna_gain:
|
|
28687
|
-
wds_mode:
|
|
28688
|
-
wds_default_bridge:
|
|
28689
|
-
default_authentication:
|
|
28690
|
-
default_forwarding:
|
|
28691
|
-
tx_power:
|
|
28692
|
-
tx_power_mode:
|
|
28693
|
-
distance:
|
|
28694
|
-
disconnect_timeout:
|
|
28695
|
-
security_profile:
|
|
28894
|
+
name: z121.string(),
|
|
28895
|
+
new_name: z121.string().optional(),
|
|
28896
|
+
ssid: z121.string().optional(),
|
|
28897
|
+
disabled: z121.boolean().optional(),
|
|
28898
|
+
comment: z121.string().optional(),
|
|
28899
|
+
mtu: z121.number().int().optional().describe("Interface MTU in bytes"),
|
|
28900
|
+
arp: z121.enum(["disabled", "enabled", "proxy-arp", "reply-only", "local-proxy-arp"]).optional().describe("ARP mode for the interface"),
|
|
28901
|
+
hide_ssid: z121.boolean().optional().describe("Legacy: do not broadcast the SSID in beacons (AP modes)"),
|
|
28902
|
+
wireless_protocol: z121.string().optional().describe("Legacy: wireless protocol, e.g. '802.11', 'nv2', 'nstreme'"),
|
|
28903
|
+
scan_list: z121.string().optional().describe("Legacy: frequencies/ranges to scan (e.g. 'default' or '5180-5320')"),
|
|
28904
|
+
frequency: z121.string().optional().describe("Legacy: operating frequency in MHz"),
|
|
28905
|
+
band: z121.string().optional().describe("Legacy: band, e.g. '2ghz-b/g/n' or '5ghz-a/n/ac'"),
|
|
28906
|
+
channel_width: z121.enum(["20mhz", "40mhz", "80mhz", "160mhz", "20/40mhz-eC", "20/40mhz-Ce"]).optional().describe("Legacy: channel width"),
|
|
28907
|
+
frequency_mode: z121.enum(["manual-txpower", "regulatory-domain", "superchannel"]).optional().describe("Legacy: regulatory frequency mode"),
|
|
28908
|
+
country: z121.string().optional().describe("Legacy: regulatory country setting (e.g. 'united states')"),
|
|
28909
|
+
antenna_gain: z121.number().int().optional().describe("Legacy: antenna gain in dBi used for tx-power calculations"),
|
|
28910
|
+
wds_mode: z121.enum(["disabled", "dynamic", "dynamic-mesh", "static", "static-mesh"]).optional().describe("Legacy: WDS mode"),
|
|
28911
|
+
wds_default_bridge: z121.string().optional().describe("Legacy: bridge that dynamic WDS interfaces are added to"),
|
|
28912
|
+
default_authentication: z121.boolean().optional().describe("Legacy: allow clients not in the access-list to authenticate"),
|
|
28913
|
+
default_forwarding: z121.boolean().optional().describe("Legacy: allow client-to-client forwarding by default"),
|
|
28914
|
+
tx_power: z121.number().int().optional().describe("Legacy: manual transmit power in dBm"),
|
|
28915
|
+
tx_power_mode: z121.enum(["default", "card-rates", "all-rates-fixed", "manual-table"]).optional().describe("Legacy: how tx-power is determined"),
|
|
28916
|
+
distance: z121.string().optional().describe("Legacy: link distance ('dynamic', 'indoors', or a km value)"),
|
|
28917
|
+
disconnect_timeout: z121.string().optional().describe("Legacy: time before a non-responding client is disconnected"),
|
|
28918
|
+
security_profile: z121.string().optional().describe("Legacy: name of the security profile to apply")
|
|
28696
28919
|
},
|
|
28697
28920
|
async handler(a, ctx) {
|
|
28698
28921
|
ctx.info(`Updating wireless interface: name=${a.name}`);
|
|
@@ -28721,7 +28944,7 @@ ${details}`;
|
|
|
28721
28944
|
annotations: READ,
|
|
28722
28945
|
description: "Lists all available regulatory country codes for wireless configuration " + "(`<auto-detected path> country print`). Each entry shows the country name/code and the " + "regulatory constraints it implies (allowed frequencies, max TX power, DFS rules, etc.). " + "Use this to discover valid values before setting a country on a wireless interface.",
|
|
28723
28946
|
inputSchema: {
|
|
28724
|
-
search:
|
|
28947
|
+
search: z121.string().optional().describe("Optional search string to filter countries by name or code.")
|
|
28725
28948
|
},
|
|
28726
28949
|
async handler(a, ctx) {
|
|
28727
28950
|
ctx.info("Listing Wi-Fi regulatory countries");
|
|
@@ -28748,7 +28971,7 @@ ${result}`;
|
|
|
28748
28971
|
];
|
|
28749
28972
|
|
|
28750
28973
|
// src/tools/wifi-optimizer.ts
|
|
28751
|
-
import { z as
|
|
28974
|
+
import { z as z122 } from "zod";
|
|
28752
28975
|
function pickBestFrequency(monitor) {
|
|
28753
28976
|
const cands = [];
|
|
28754
28977
|
for (const line of monitor.split(`
|
|
@@ -28769,9 +28992,9 @@ var wifiOptimizerTools = [
|
|
|
28769
28992
|
annotations: WRITE,
|
|
28770
28993
|
description: "Runs an RF survey on a wireless radio (`/interface wireless frequency-monitor`, blocking for " + "`duration`), finds the least-congested channel, and reports a before/after. DEFAULTS TO A DRY " + "RUN (`apply=false`) \u2014 it surveys and recommends; set `apply=true` to set the radio to the best " + "frequency (`/interface wireless set`). Targets the LEGACY wireless stack; for wifiwave2 " + "(`/interface wifi`) tune via those tools. Returns the per-channel usage finding and the chosen " + "frequency.",
|
|
28771
28994
|
inputSchema: {
|
|
28772
|
-
interface:
|
|
28773
|
-
duration:
|
|
28774
|
-
apply:
|
|
28995
|
+
interface: z122.string().describe("Wireless interface, e.g. 'wlan1'"),
|
|
28996
|
+
duration: z122.string().default("5").describe("Survey duration in seconds"),
|
|
28997
|
+
apply: z122.boolean().default(false).describe("false = survey & recommend (default); true = set it")
|
|
28775
28998
|
},
|
|
28776
28999
|
async handler(a, ctx) {
|
|
28777
29000
|
ctx.info(`Wi-Fi survey on ${a.interface} for ${a.duration}s`);
|
|
@@ -28796,16 +29019,16 @@ ${monitor.trim() || "(empty)"}`;
|
|
|
28796
29019
|
];
|
|
28797
29020
|
|
|
28798
29021
|
// src/tools/memory.ts
|
|
28799
|
-
import { z as
|
|
28800
|
-
var EntityInput =
|
|
28801
|
-
name:
|
|
28802
|
-
entityType:
|
|
28803
|
-
observations:
|
|
29022
|
+
import { z as z123 } from "zod";
|
|
29023
|
+
var EntityInput = z123.object({
|
|
29024
|
+
name: z123.string().describe("Unique name of the entity"),
|
|
29025
|
+
entityType: z123.string().describe("Type/category of the entity (e.g. 'router', 'subnet', 'person')"),
|
|
29026
|
+
observations: z123.array(z123.string()).optional().describe("Initial observations (facts) to attach")
|
|
28804
29027
|
});
|
|
28805
|
-
var RelationInput =
|
|
28806
|
-
from:
|
|
28807
|
-
to:
|
|
28808
|
-
relationType:
|
|
29028
|
+
var RelationInput = z123.object({
|
|
29029
|
+
from: z123.string().describe("Source entity name"),
|
|
29030
|
+
to: z123.string().describe("Target entity name"),
|
|
29031
|
+
relationType: z123.string().describe("Relation type in active voice (e.g. 'manages', 'connects_to', 'depends_on')")
|
|
28809
29032
|
});
|
|
28810
29033
|
var memoryTools = [
|
|
28811
29034
|
defineTool({
|
|
@@ -28814,7 +29037,7 @@ var memoryTools = [
|
|
|
28814
29037
|
annotations: WRITE,
|
|
28815
29038
|
description: "Create one or more new entities in the persistent knowledge graph. Each entity has a " + "unique name, a type (e.g. 'router', 'subnet', 'vlan', 'person', 'config_pattern'), " + "and optional initial observations. Entities that already exist are silently skipped. " + "Use this to record things the AI learns about the network, devices, users, or patterns.",
|
|
28816
29039
|
inputSchema: {
|
|
28817
|
-
entities:
|
|
29040
|
+
entities: z123.array(EntityInput).min(1).describe("Entities to create")
|
|
28818
29041
|
},
|
|
28819
29042
|
async handler(args) {
|
|
28820
29043
|
const store3 = await getMemoryStore();
|
|
@@ -28832,7 +29055,7 @@ ${created.map((e) => ` - ${e.name} (${e.entityType})`).join(`
|
|
|
28832
29055
|
annotations: WRITE,
|
|
28833
29056
|
description: "Create directed relations between existing entities in the knowledge graph. Both " + "endpoint entities must already exist. Use active voice for relation types (e.g. " + "'manages', 'connects_to', 'provides_dhcp_for', 'part_of'). Duplicate relations " + "are silently skipped.",
|
|
28834
29057
|
inputSchema: {
|
|
28835
|
-
relations:
|
|
29058
|
+
relations: z123.array(RelationInput).min(1).describe("Relations to create")
|
|
28836
29059
|
},
|
|
28837
29060
|
async handler(args) {
|
|
28838
29061
|
const store3 = await getMemoryStore();
|
|
@@ -28850,9 +29073,9 @@ ${created.map((r) => ` - ${r.from} --[${r.relationType}]--> ${r.to}`).join(`
|
|
|
28850
29073
|
annotations: WRITE,
|
|
28851
29074
|
description: "Add new observations (discrete facts) to existing entities in the knowledge graph. " + "Each observation is a string (e.g. 'runs RouterOS 7.16', 'has 4 ether ports', " + "'managed by John'). Duplicate observations on the same entity are silently skipped. " + "The entity must already exist.",
|
|
28852
29075
|
inputSchema: {
|
|
28853
|
-
observations:
|
|
28854
|
-
entityName:
|
|
28855
|
-
contents:
|
|
29076
|
+
observations: z123.array(z123.object({
|
|
29077
|
+
entityName: z123.string().describe("Name of the existing entity"),
|
|
29078
|
+
contents: z123.array(z123.string()).min(1).describe("Observations to add")
|
|
28856
29079
|
})).min(1)
|
|
28857
29080
|
},
|
|
28858
29081
|
async handler(args) {
|
|
@@ -28872,7 +29095,7 @@ ${lines.join(`
|
|
|
28872
29095
|
annotations: DESTRUCTIVE,
|
|
28873
29096
|
description: "Remove entities from the knowledge graph. This also deletes all their observations " + "and any relations where they appear as an endpoint (cascade delete).",
|
|
28874
29097
|
inputSchema: {
|
|
28875
|
-
entityNames:
|
|
29098
|
+
entityNames: z123.array(z123.string()).min(1).describe("Names of entities to delete")
|
|
28876
29099
|
},
|
|
28877
29100
|
async handler(args) {
|
|
28878
29101
|
const store3 = await getMemoryStore();
|
|
@@ -28886,9 +29109,9 @@ ${lines.join(`
|
|
|
28886
29109
|
annotations: DESTRUCTIVE,
|
|
28887
29110
|
description: "Remove specific observations from entities in the knowledge graph. The entity " + "itself is kept; only the named observation strings are removed.",
|
|
28888
29111
|
inputSchema: {
|
|
28889
|
-
deletions:
|
|
28890
|
-
entityName:
|
|
28891
|
-
observations:
|
|
29112
|
+
deletions: z123.array(z123.object({
|
|
29113
|
+
entityName: z123.string().describe("Entity to remove observations from"),
|
|
29114
|
+
observations: z123.array(z123.string()).min(1).describe("Exact observation strings to delete")
|
|
28892
29115
|
})).min(1)
|
|
28893
29116
|
},
|
|
28894
29117
|
async handler(args) {
|
|
@@ -28903,7 +29126,7 @@ ${lines.join(`
|
|
|
28903
29126
|
annotations: DESTRUCTIVE,
|
|
28904
29127
|
description: "Remove specific relations from the knowledge graph. Each relation is identified " + "by its (from, to, relationType) triple.",
|
|
28905
29128
|
inputSchema: {
|
|
28906
|
-
relations:
|
|
29129
|
+
relations: z123.array(RelationInput).min(1).describe("Relations to delete")
|
|
28907
29130
|
},
|
|
28908
29131
|
async handler(args) {
|
|
28909
29132
|
const store3 = await getMemoryStore();
|
|
@@ -28931,8 +29154,8 @@ ${lines.join(`
|
|
|
28931
29154
|
annotations: READ,
|
|
28932
29155
|
description: "Search for entities in the knowledge graph by name, type, or observation content. " + "Returns matching entities with their observations, plus any relations where at " + "least one endpoint is in the result set.",
|
|
28933
29156
|
inputSchema: {
|
|
28934
|
-
query:
|
|
28935
|
-
limit:
|
|
29157
|
+
query: z123.string().describe("Search term \u2014 matched against entity names, types, and observation content"),
|
|
29158
|
+
limit: z123.number().int().positive().optional().describe("Max entities to return (default 50)")
|
|
28936
29159
|
},
|
|
28937
29160
|
async handler(args) {
|
|
28938
29161
|
const store3 = await getMemoryStore();
|
|
@@ -28948,7 +29171,7 @@ ${lines.join(`
|
|
|
28948
29171
|
annotations: READ,
|
|
28949
29172
|
description: "Retrieve specific entities by exact name from the knowledge graph, with all their " + "observations and any relations where at least one endpoint is in the requested set.",
|
|
28950
29173
|
inputSchema: {
|
|
28951
|
-
names:
|
|
29174
|
+
names: z123.array(z123.string()).min(1).describe("Exact entity names to retrieve")
|
|
28952
29175
|
},
|
|
28953
29176
|
async handler(args) {
|
|
28954
29177
|
const store3 = await getMemoryStore();
|
|
@@ -28969,6 +29192,13 @@ var moduleCatalog = [
|
|
|
28969
29192
|
description: "Always-discoverable meta-tools that make the whole catalog reachable when the host can't " + "surface a specific tool: search by intent (`find_tools`), inspect a schema (`describe_tool`), " + "and run any tool by name with full validation (`invoke_tool`).",
|
|
28970
29193
|
tools: toolGatewayTools
|
|
28971
29194
|
},
|
|
29195
|
+
{
|
|
29196
|
+
label: "Server Pulse",
|
|
29197
|
+
slug: "server-pulse",
|
|
29198
|
+
group: "Discovery & Meta",
|
|
29199
|
+
description: "Server self-awareness: running version, update availability, release notes, " + "upgrade path, and server vitals. No RouterOS device is contacted.",
|
|
29200
|
+
tools: serverPulseTools
|
|
29201
|
+
},
|
|
28972
29202
|
{
|
|
28973
29203
|
label: "RouterOS CLI",
|
|
28974
29204
|
slug: "raw-command",
|
|
@@ -29825,7 +30055,7 @@ var moduleCatalog = [
|
|
|
29825
30055
|
}
|
|
29826
30056
|
];
|
|
29827
30057
|
var allToolModules = moduleCatalog.map((m) => m.tools);
|
|
29828
|
-
var ALWAYS_ON_MODULES = new Set(["tool-gateway", "memory"]);
|
|
30058
|
+
var ALWAYS_ON_MODULES = new Set(["tool-gateway", "memory", "server-pulse"]);
|
|
29829
30059
|
function selectToolModules(filter = {}, catalog = moduleCatalog) {
|
|
29830
30060
|
const lc = (xs) => new Set((xs ?? []).map((s) => s.toLowerCase()));
|
|
29831
30061
|
const enabledModules = lc(filter.enabledModules);
|
|
@@ -29846,4 +30076,4 @@ function selectToolModules(filter = {}, catalog = moduleCatalog) {
|
|
|
29846
30076
|
}).map((m) => m.tools);
|
|
29847
30077
|
}
|
|
29848
30078
|
|
|
29849
|
-
export { __require, DEFAULT_SNAPSHOT_DB, DEFAULT_CONFIG_HISTORY_DIR, DeviceConfigSchema, ToolFilterSchema, MikrotikConfigSchema, getConfigSource, loadConfig, logger, setConfig, getConfig, listDevices, deviceLabels, resolveDeviceName, deviceDirectory, isMacTelnetDevice, createDeviceClient, describeTransport, isPoolEnabled, closeAll, poolStatus, getMemoryStore, closeMemoryStore, reopenMemoryStore, executeMikrotikCommand, createContext, Cmd, isEmpty, looksLikeError, commandUnsupported, parseKeyValues, parseRouterosDate, parseSize, parseSystemResource, parseRecords, parseLeadingNumber, REDACTED, redact, configureRecorder, getEventStore, subscribe, subscriberCount, registerTools, fetchDevices, sampleDeviceTraffic, sampleAllTraffic, setDeviceLimits, blockDevice, allowDevice, makeDeviceStatic, setDeviceIp, setDeviceLabel, removeDeviceLease, devicesView, PROMPTS_DIR,
|
|
30079
|
+
export { __require, DEFAULT_SNAPSHOT_DB, DEFAULT_CONFIG_HISTORY_DIR, DeviceConfigSchema, ToolFilterSchema, MikrotikConfigSchema, getConfigSource, loadConfig, logger, setConfig, getConfig, listDevices, deviceLabels, resolveDeviceName, deviceDirectory, isMacTelnetDevice, createDeviceClient, describeTransport, isPoolEnabled, closeAll, poolStatus, getMemoryStore, closeMemoryStore, reopenMemoryStore, executeMikrotikCommand, createContext, Cmd, isEmpty, looksLikeError, commandUnsupported, parseKeyValues, parseRouterosDate, parseSize, parseSystemResource, parseRecords, parseLeadingNumber, REDACTED, redact, configureRecorder, getEventStore, subscribe, subscriberCount, registerTools, fetchDevices, sampleDeviceTraffic, sampleAllTraffic, setDeviceLimits, blockDevice, allowDevice, makeDeviceStatic, setDeviceIp, setDeviceLabel, removeDeviceLease, devicesView, PROMPTS_DIR, UI_DIST_DIR, registerUiResources, backupDir, listBackups, readBackup, writeBackup, deleteBackup, renameBackup, createLocalBackup, restoreLocalBackup, isS3Configured, getS3Client, presignExpiresIn, s3Target, splitCommands, buildChangePlan, renderPlan, diffLines, normalizeExport, analyzeDrift, attributeChanges, openSnapshotStore, DEFAULT_TZSP_PORT, capture2 as capture, AAA_ENTITIES, listAaaEntity, addAaaEntity, updateAaaEntity, removeAaaEntity, toggleAaaEntity, getRadiusIncoming, setRadiusIncoming, resetRadiusCounters, getUmSettings, setUmSettings, VERSION, WEBSITE_URL, LOGO_URL, SERVER_TITLE, SERVER_DESCRIPTION, SERVER_NAME, PKG_META, loadFileCacheSync, fetchLatestRelease, checkForUpdate, updateSummaryLine, moduleCatalog, allToolModules, ALWAYS_ON_MODULES, selectToolModules };
|