@usex/mikrotik-mcp 3.13.0 → 3.15.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 +2277 -1968
- package/dist/index.d.ts +6 -0
- package/dist/index.js +2273 -1964
- package/dist/ui/observability.html +3 -3
- package/package.json +1 -1
- package/schemas/README.md +1 -1
- package/schemas/tool-catalog.json +405 -7
- package/schemas/tools/create_mangle_rule.json +126 -0
- package/schemas/tools/disable_mangle_rule.json +12 -0
- package/schemas/tools/enable_mangle_rule.json +12 -0
- package/schemas/tools/get_mangle_rule.json +13 -0
- package/schemas/tools/list_mangle_rules.json +33 -0
- package/schemas/tools/move_mangle_rule.json +18 -0
- package/schemas/tools/remove_mangle_rule.json +12 -0
- package/schemas/tools/update_mangle_rule.json +93 -0
package/package.json
CHANGED
package/schemas/README.md
CHANGED
|
@@ -7,7 +7,7 @@ edit by hand — regenerate instead.
|
|
|
7
7
|
| File | Contents |
|
|
8
8
|
| -------------------- | ------------------------------------------------------------------------------------------ |
|
|
9
9
|
| `config.schema.json` | The runtime configuration object (env vars / CLI flags). |
|
|
10
|
-
| `tool-catalog.json` | Every one of the
|
|
10
|
+
| `tool-catalog.json` | Every one of the 715 tools: `name`, `risk`, `title`, `description`, and input JSON Schema. |
|
|
11
11
|
| `tools/<name>.json` | The input JSON Schema for a single tool. |
|
|
12
12
|
|
|
13
13
|
`risk` is derived from the MCP tool annotations:
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.14.0",
|
|
4
4
|
"generated": "by scripts/gen-schemas.ts — do not edit by hand",
|
|
5
|
-
"toolCount":
|
|
5
|
+
"toolCount": 715,
|
|
6
6
|
"tools": [
|
|
7
7
|
{
|
|
8
8
|
"name": "list_interfaces",
|
|
@@ -10444,6 +10444,404 @@
|
|
|
10444
10444
|
"additionalProperties": false
|
|
10445
10445
|
}
|
|
10446
10446
|
},
|
|
10447
|
+
{
|
|
10448
|
+
"name": "create_mangle_rule",
|
|
10449
|
+
"title": "Create IPv4 Firewall Mangle Rule",
|
|
10450
|
+
"risk": "write",
|
|
10451
|
+
"annotations": {
|
|
10452
|
+
"destructiveHint": false,
|
|
10453
|
+
"openWorldHint": false
|
|
10454
|
+
},
|
|
10455
|
+
"description": "Creates an IPv4 mangle rule (`/ip firewall mangle add`) — the packet-marking and header-modification table, used to mark connections/packets/routing (for policy routing, QoS and per-connection classification) or to change DSCP/TTL/MSS. For accept/drop decisions use create_filter_rule; for address translation use create_nat_rule; for IPv6 mangle use create_ipv6_mangle_rule. chain: prerouting/input/forward/output/postrouting. action: mark-connection/mark-packet/mark-routing/change-dscp/change-ttl/change-mss/add-src-to-address-list/add-dst-to-address-list/fasttrack-connection/route/set-priority/accept/etc. Set the matching new-*-mark field for mark-* actions and keep passthrough=true so later rules can also match the same packet; for add-*-to-address-list set address_list (and optionally address_list_timeout). place_before accepts a rule number or ID (*N) to control insertion position. Returns the created rule's detail including its `.id`.",
|
|
10456
|
+
"inputSchema": {
|
|
10457
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
10458
|
+
"type": "object",
|
|
10459
|
+
"properties": {
|
|
10460
|
+
"chain": {
|
|
10461
|
+
"type": "string",
|
|
10462
|
+
"enum": ["prerouting", "input", "forward", "output", "postrouting"]
|
|
10463
|
+
},
|
|
10464
|
+
"action": {
|
|
10465
|
+
"type": "string",
|
|
10466
|
+
"enum": [
|
|
10467
|
+
"accept",
|
|
10468
|
+
"add-dst-to-address-list",
|
|
10469
|
+
"add-src-to-address-list",
|
|
10470
|
+
"change-dscp",
|
|
10471
|
+
"change-mss",
|
|
10472
|
+
"change-ttl",
|
|
10473
|
+
"clear-df",
|
|
10474
|
+
"drop",
|
|
10475
|
+
"fasttrack-connection",
|
|
10476
|
+
"jump",
|
|
10477
|
+
"log",
|
|
10478
|
+
"mark-connection",
|
|
10479
|
+
"mark-packet",
|
|
10480
|
+
"mark-routing",
|
|
10481
|
+
"passthrough",
|
|
10482
|
+
"return",
|
|
10483
|
+
"route",
|
|
10484
|
+
"set-priority",
|
|
10485
|
+
"sniff-pc",
|
|
10486
|
+
"sniff-tzsp"
|
|
10487
|
+
]
|
|
10488
|
+
},
|
|
10489
|
+
"src_address": {
|
|
10490
|
+
"type": "string"
|
|
10491
|
+
},
|
|
10492
|
+
"dst_address": {
|
|
10493
|
+
"type": "string"
|
|
10494
|
+
},
|
|
10495
|
+
"src_port": {
|
|
10496
|
+
"type": "string"
|
|
10497
|
+
},
|
|
10498
|
+
"dst_port": {
|
|
10499
|
+
"type": "string"
|
|
10500
|
+
},
|
|
10501
|
+
"protocol": {
|
|
10502
|
+
"type": "string"
|
|
10503
|
+
},
|
|
10504
|
+
"in_interface": {
|
|
10505
|
+
"type": "string"
|
|
10506
|
+
},
|
|
10507
|
+
"out_interface": {
|
|
10508
|
+
"type": "string"
|
|
10509
|
+
},
|
|
10510
|
+
"connection_mark": {
|
|
10511
|
+
"type": "string"
|
|
10512
|
+
},
|
|
10513
|
+
"packet_mark": {
|
|
10514
|
+
"type": "string"
|
|
10515
|
+
},
|
|
10516
|
+
"routing_mark": {
|
|
10517
|
+
"type": "string"
|
|
10518
|
+
},
|
|
10519
|
+
"connection_state": {
|
|
10520
|
+
"description": "e.g. \"new\", \"established,related\", \"invalid\"",
|
|
10521
|
+
"type": "string"
|
|
10522
|
+
},
|
|
10523
|
+
"new_connection_mark": {
|
|
10524
|
+
"type": "string"
|
|
10525
|
+
},
|
|
10526
|
+
"new_packet_mark": {
|
|
10527
|
+
"type": "string"
|
|
10528
|
+
},
|
|
10529
|
+
"new_routing_mark": {
|
|
10530
|
+
"type": "string"
|
|
10531
|
+
},
|
|
10532
|
+
"new_dscp": {
|
|
10533
|
+
"description": "0-63, for change-dscp",
|
|
10534
|
+
"type": "string"
|
|
10535
|
+
},
|
|
10536
|
+
"new_ttl": {
|
|
10537
|
+
"description": "e.g. \"decrement\", \"increment\", or \"set:64\"",
|
|
10538
|
+
"type": "string"
|
|
10539
|
+
},
|
|
10540
|
+
"new_mss": {
|
|
10541
|
+
"description": "e.g. \"1440\" or \"clamp-to-pmtu\", for change-mss",
|
|
10542
|
+
"type": "string"
|
|
10543
|
+
},
|
|
10544
|
+
"routing_table": {
|
|
10545
|
+
"description": "Routing table for action=route",
|
|
10546
|
+
"type": "string"
|
|
10547
|
+
},
|
|
10548
|
+
"address_list": {
|
|
10549
|
+
"description": "Target list name for add-src/dst-to-address-list",
|
|
10550
|
+
"type": "string"
|
|
10551
|
+
},
|
|
10552
|
+
"address_list_timeout": {
|
|
10553
|
+
"description": "Entry timeout for add-*-to-address-list e.g. \"1h\", \"none\"",
|
|
10554
|
+
"type": "string"
|
|
10555
|
+
},
|
|
10556
|
+
"passthrough": {
|
|
10557
|
+
"type": "boolean"
|
|
10558
|
+
},
|
|
10559
|
+
"comment": {
|
|
10560
|
+
"type": "string"
|
|
10561
|
+
},
|
|
10562
|
+
"disabled": {
|
|
10563
|
+
"default": false,
|
|
10564
|
+
"type": "boolean"
|
|
10565
|
+
},
|
|
10566
|
+
"log": {
|
|
10567
|
+
"default": false,
|
|
10568
|
+
"type": "boolean"
|
|
10569
|
+
},
|
|
10570
|
+
"log_prefix": {
|
|
10571
|
+
"type": "string"
|
|
10572
|
+
},
|
|
10573
|
+
"place_before": {
|
|
10574
|
+
"description": "Rule number or ID (*N) to insert before",
|
|
10575
|
+
"type": "string"
|
|
10576
|
+
}
|
|
10577
|
+
},
|
|
10578
|
+
"required": ["chain", "action", "disabled", "log"],
|
|
10579
|
+
"additionalProperties": false
|
|
10580
|
+
}
|
|
10581
|
+
},
|
|
10582
|
+
{
|
|
10583
|
+
"name": "list_mangle_rules",
|
|
10584
|
+
"title": "List IPv4 Firewall Mangle Rules",
|
|
10585
|
+
"risk": "read",
|
|
10586
|
+
"annotations": {
|
|
10587
|
+
"readOnlyHint": true,
|
|
10588
|
+
"idempotentHint": true,
|
|
10589
|
+
"openWorldHint": false
|
|
10590
|
+
},
|
|
10591
|
+
"description": "Lists IPv4 mangle rules (`/ip firewall mangle print`) — returns all rules in the mangle table with their IDs, chains, actions, and match criteria. For IPv4 filter use list_filter_rules; for IPv4 NAT use list_nat_rules; for IPv6 mangle use list_ipv6_mangle_rules. Optionally filter by chain, action, connection-mark, packet-mark, disabled, invalid, or dynamic status. Rule `.id` values from this output are required by get_mangle_rule, update_mangle_rule, remove_mangle_rule, move_mangle_rule, enable_mangle_rule, and disable_mangle_rule.",
|
|
10592
|
+
"inputSchema": {
|
|
10593
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
10594
|
+
"type": "object",
|
|
10595
|
+
"properties": {
|
|
10596
|
+
"chain_filter": {
|
|
10597
|
+
"type": "string"
|
|
10598
|
+
},
|
|
10599
|
+
"action_filter": {
|
|
10600
|
+
"type": "string"
|
|
10601
|
+
},
|
|
10602
|
+
"connection_mark_filter": {
|
|
10603
|
+
"type": "string"
|
|
10604
|
+
},
|
|
10605
|
+
"packet_mark_filter": {
|
|
10606
|
+
"type": "string"
|
|
10607
|
+
},
|
|
10608
|
+
"disabled_only": {
|
|
10609
|
+
"default": false,
|
|
10610
|
+
"type": "boolean"
|
|
10611
|
+
},
|
|
10612
|
+
"invalid_only": {
|
|
10613
|
+
"default": false,
|
|
10614
|
+
"type": "boolean"
|
|
10615
|
+
},
|
|
10616
|
+
"dynamic_only": {
|
|
10617
|
+
"default": false,
|
|
10618
|
+
"type": "boolean"
|
|
10619
|
+
}
|
|
10620
|
+
},
|
|
10621
|
+
"required": ["disabled_only", "invalid_only", "dynamic_only"],
|
|
10622
|
+
"additionalProperties": false
|
|
10623
|
+
}
|
|
10624
|
+
},
|
|
10625
|
+
{
|
|
10626
|
+
"name": "get_mangle_rule",
|
|
10627
|
+
"title": "Get IPv4 Firewall Mangle Rule Details",
|
|
10628
|
+
"risk": "read",
|
|
10629
|
+
"annotations": {
|
|
10630
|
+
"readOnlyHint": true,
|
|
10631
|
+
"idempotentHint": true,
|
|
10632
|
+
"openWorldHint": false
|
|
10633
|
+
},
|
|
10634
|
+
"description": "Retrieves full detail for a single IPv4 mangle rule (`/ip firewall mangle print detail where .id=`). Use when you need all fields of one specific rule rather than the full table listing. For the full list use list_mangle_rules; for IPv6 mangle use get_ipv6_mangle_rule. rule_id takes the `.id` value (e.g. \"*1\" or \"0\") returned by list_mangle_rules.",
|
|
10635
|
+
"inputSchema": {
|
|
10636
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
10637
|
+
"type": "object",
|
|
10638
|
+
"properties": {
|
|
10639
|
+
"rule_id": {
|
|
10640
|
+
"type": "string",
|
|
10641
|
+
"description": "Rule ID from list output e.g. \"*1\" or \"0\""
|
|
10642
|
+
}
|
|
10643
|
+
},
|
|
10644
|
+
"required": ["rule_id"],
|
|
10645
|
+
"additionalProperties": false
|
|
10646
|
+
}
|
|
10647
|
+
},
|
|
10648
|
+
{
|
|
10649
|
+
"name": "update_mangle_rule",
|
|
10650
|
+
"title": "Update IPv4 Firewall Mangle Rule",
|
|
10651
|
+
"risk": "write-idempotent",
|
|
10652
|
+
"annotations": {
|
|
10653
|
+
"destructiveHint": false,
|
|
10654
|
+
"idempotentHint": true,
|
|
10655
|
+
"openWorldHint": false
|
|
10656
|
+
},
|
|
10657
|
+
"description": "Updates fields on an existing IPv4 mangle rule (`/ip firewall mangle set`) — change chain, action, match criteria, mark values, DSCP, TTL, MSS, or flags without recreating the rule. To toggle enabled state only use enable_mangle_rule or disable_mangle_rule; for IPv6 mangle use update_ipv6_mangle_rule. rule_id takes the `.id` from list_mangle_rules. Pass \"\" (empty string) for an optional field to clear it. Returns the updated rule's full detail.",
|
|
10658
|
+
"inputSchema": {
|
|
10659
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
10660
|
+
"type": "object",
|
|
10661
|
+
"properties": {
|
|
10662
|
+
"rule_id": {
|
|
10663
|
+
"type": "string"
|
|
10664
|
+
},
|
|
10665
|
+
"chain": {
|
|
10666
|
+
"type": "string"
|
|
10667
|
+
},
|
|
10668
|
+
"action": {
|
|
10669
|
+
"type": "string"
|
|
10670
|
+
},
|
|
10671
|
+
"src_address": {
|
|
10672
|
+
"type": "string"
|
|
10673
|
+
},
|
|
10674
|
+
"dst_address": {
|
|
10675
|
+
"type": "string"
|
|
10676
|
+
},
|
|
10677
|
+
"src_port": {
|
|
10678
|
+
"type": "string"
|
|
10679
|
+
},
|
|
10680
|
+
"dst_port": {
|
|
10681
|
+
"type": "string"
|
|
10682
|
+
},
|
|
10683
|
+
"protocol": {
|
|
10684
|
+
"type": "string"
|
|
10685
|
+
},
|
|
10686
|
+
"in_interface": {
|
|
10687
|
+
"type": "string"
|
|
10688
|
+
},
|
|
10689
|
+
"out_interface": {
|
|
10690
|
+
"type": "string"
|
|
10691
|
+
},
|
|
10692
|
+
"connection_mark": {
|
|
10693
|
+
"type": "string"
|
|
10694
|
+
},
|
|
10695
|
+
"packet_mark": {
|
|
10696
|
+
"type": "string"
|
|
10697
|
+
},
|
|
10698
|
+
"routing_mark": {
|
|
10699
|
+
"type": "string"
|
|
10700
|
+
},
|
|
10701
|
+
"connection_state": {
|
|
10702
|
+
"type": "string"
|
|
10703
|
+
},
|
|
10704
|
+
"new_connection_mark": {
|
|
10705
|
+
"type": "string"
|
|
10706
|
+
},
|
|
10707
|
+
"new_packet_mark": {
|
|
10708
|
+
"type": "string"
|
|
10709
|
+
},
|
|
10710
|
+
"new_routing_mark": {
|
|
10711
|
+
"type": "string"
|
|
10712
|
+
},
|
|
10713
|
+
"new_dscp": {
|
|
10714
|
+
"type": "string"
|
|
10715
|
+
},
|
|
10716
|
+
"new_ttl": {
|
|
10717
|
+
"type": "string"
|
|
10718
|
+
},
|
|
10719
|
+
"new_mss": {
|
|
10720
|
+
"type": "string"
|
|
10721
|
+
},
|
|
10722
|
+
"routing_table": {
|
|
10723
|
+
"type": "string"
|
|
10724
|
+
},
|
|
10725
|
+
"address_list": {
|
|
10726
|
+
"type": "string"
|
|
10727
|
+
},
|
|
10728
|
+
"address_list_timeout": {
|
|
10729
|
+
"type": "string"
|
|
10730
|
+
},
|
|
10731
|
+
"passthrough": {
|
|
10732
|
+
"type": "boolean"
|
|
10733
|
+
},
|
|
10734
|
+
"comment": {
|
|
10735
|
+
"type": "string"
|
|
10736
|
+
},
|
|
10737
|
+
"disabled": {
|
|
10738
|
+
"type": "boolean"
|
|
10739
|
+
},
|
|
10740
|
+
"log": {
|
|
10741
|
+
"type": "boolean"
|
|
10742
|
+
},
|
|
10743
|
+
"log_prefix": {
|
|
10744
|
+
"type": "string"
|
|
10745
|
+
}
|
|
10746
|
+
},
|
|
10747
|
+
"required": ["rule_id"],
|
|
10748
|
+
"additionalProperties": false
|
|
10749
|
+
}
|
|
10750
|
+
},
|
|
10751
|
+
{
|
|
10752
|
+
"name": "remove_mangle_rule",
|
|
10753
|
+
"title": "Remove IPv4 Firewall Mangle Rule",
|
|
10754
|
+
"risk": "destructive",
|
|
10755
|
+
"annotations": {
|
|
10756
|
+
"destructiveHint": true,
|
|
10757
|
+
"idempotentHint": true,
|
|
10758
|
+
"openWorldHint": false
|
|
10759
|
+
},
|
|
10760
|
+
"description": "Permanently deletes an IPv4 mangle rule (`/ip firewall mangle remove`) — verifies the rule exists first, then removes it. To only deactivate without deleting use disable_mangle_rule; for IPv6 mangle use remove_ipv6_mangle_rule. rule_id takes the `.id` from list_mangle_rules. Returns confirmation on success or a not-found message if the ID is absent.",
|
|
10761
|
+
"inputSchema": {
|
|
10762
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
10763
|
+
"type": "object",
|
|
10764
|
+
"properties": {
|
|
10765
|
+
"rule_id": {
|
|
10766
|
+
"type": "string"
|
|
10767
|
+
}
|
|
10768
|
+
},
|
|
10769
|
+
"required": ["rule_id"],
|
|
10770
|
+
"additionalProperties": false
|
|
10771
|
+
}
|
|
10772
|
+
},
|
|
10773
|
+
{
|
|
10774
|
+
"name": "move_mangle_rule",
|
|
10775
|
+
"title": "Move IPv4 Firewall Mangle Rule",
|
|
10776
|
+
"risk": "write-idempotent",
|
|
10777
|
+
"annotations": {
|
|
10778
|
+
"destructiveHint": false,
|
|
10779
|
+
"idempotentHint": true,
|
|
10780
|
+
"openWorldHint": false
|
|
10781
|
+
},
|
|
10782
|
+
"description": "Reorders an IPv4 mangle rule to a specific position (`/ip firewall mangle move`) — mangle rules are evaluated top-down, so position controls which rules fire first. For IPv4 filter reordering use move_filter_rule; for IPv6 mangle use move_ipv6_mangle_rule. rule_id takes the `.id` from list_mangle_rules; destination is the 0-based target index. Verifies the rule exists before moving.",
|
|
10783
|
+
"inputSchema": {
|
|
10784
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
10785
|
+
"type": "object",
|
|
10786
|
+
"properties": {
|
|
10787
|
+
"rule_id": {
|
|
10788
|
+
"type": "string"
|
|
10789
|
+
},
|
|
10790
|
+
"destination": {
|
|
10791
|
+
"type": "integer",
|
|
10792
|
+
"minimum": -9007199254740991,
|
|
10793
|
+
"maximum": 9007199254740991,
|
|
10794
|
+
"description": "0-based target position index"
|
|
10795
|
+
}
|
|
10796
|
+
},
|
|
10797
|
+
"required": ["rule_id", "destination"],
|
|
10798
|
+
"additionalProperties": false
|
|
10799
|
+
}
|
|
10800
|
+
},
|
|
10801
|
+
{
|
|
10802
|
+
"name": "enable_mangle_rule",
|
|
10803
|
+
"title": "Enable IPv4 Firewall Mangle Rule",
|
|
10804
|
+
"risk": "write-idempotent",
|
|
10805
|
+
"annotations": {
|
|
10806
|
+
"destructiveHint": false,
|
|
10807
|
+
"idempotentHint": true,
|
|
10808
|
+
"openWorldHint": false
|
|
10809
|
+
},
|
|
10810
|
+
"description": "Enables a disabled IPv4 mangle rule (`/ip firewall mangle set disabled=no`) so it participates in packet processing again. To deactivate use disable_mangle_rule; to delete permanently use remove_mangle_rule; for IPv6 mangle use enable_ipv6_mangle_rule. rule_id takes the `.id` from list_mangle_rules. Returns the updated rule's detail.",
|
|
10811
|
+
"inputSchema": {
|
|
10812
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
10813
|
+
"type": "object",
|
|
10814
|
+
"properties": {
|
|
10815
|
+
"rule_id": {
|
|
10816
|
+
"type": "string"
|
|
10817
|
+
}
|
|
10818
|
+
},
|
|
10819
|
+
"required": ["rule_id"],
|
|
10820
|
+
"additionalProperties": false
|
|
10821
|
+
}
|
|
10822
|
+
},
|
|
10823
|
+
{
|
|
10824
|
+
"name": "disable_mangle_rule",
|
|
10825
|
+
"title": "Disable IPv4 Firewall Mangle Rule",
|
|
10826
|
+
"risk": "write-idempotent",
|
|
10827
|
+
"annotations": {
|
|
10828
|
+
"destructiveHint": false,
|
|
10829
|
+
"idempotentHint": true,
|
|
10830
|
+
"openWorldHint": false
|
|
10831
|
+
},
|
|
10832
|
+
"description": "Disables an active IPv4 mangle rule (`/ip firewall mangle set disabled=yes`) — the rule remains in the table but is skipped during packet processing. To re-enable use enable_mangle_rule; to delete permanently use remove_mangle_rule; for IPv6 mangle use disable_ipv6_mangle_rule. rule_id takes the `.id` from list_mangle_rules. Returns the updated rule's detail.",
|
|
10833
|
+
"inputSchema": {
|
|
10834
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
10835
|
+
"type": "object",
|
|
10836
|
+
"properties": {
|
|
10837
|
+
"rule_id": {
|
|
10838
|
+
"type": "string"
|
|
10839
|
+
}
|
|
10840
|
+
},
|
|
10841
|
+
"required": ["rule_id"],
|
|
10842
|
+
"additionalProperties": false
|
|
10843
|
+
}
|
|
10844
|
+
},
|
|
10447
10845
|
{
|
|
10448
10846
|
"name": "forward_port",
|
|
10449
10847
|
"title": "Forward a Port (Smart Wizard)",
|
|
@@ -14072,7 +14470,7 @@
|
|
|
14072
14470
|
"idempotentHint": true,
|
|
14073
14471
|
"openWorldHint": false
|
|
14074
14472
|
},
|
|
14075
|
-
"description": "
|
|
14473
|
+
"description": "`get_ovpn_server` — READ / get / show / inspect the OpenVPN (OVPN) server settings and status (`/interface ovpn-server server print`) — the singleton inbound-server instance: whether it is enabled/running, certificate, auth/cipher algorithms, port, protocol, netmask, mode, max_mtu, default_profile, require_client_certificate. Use set_ovpn_server to modify these settings. For outbound OVPN tunnels to a remote server use list_ovpn_clients or get_ovpn_client. For other VPN tunnel types use create_l2tp_client, create_pptp_client, or create_sstp_client. Returns the full server parameter block or a not-found message.",
|
|
14076
14474
|
"inputSchema": {
|
|
14077
14475
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
14078
14476
|
"type": "object",
|
|
@@ -14221,7 +14619,7 @@
|
|
|
14221
14619
|
"idempotentHint": true,
|
|
14222
14620
|
"openWorldHint": false
|
|
14223
14621
|
},
|
|
14224
|
-
"description": "
|
|
14622
|
+
"description": "`list_ovpn_clients` — READ / list / show / inspect / enumerate all OpenVPN (OVPN) client interfaces (`/interface ovpn-client print`) and whether each tunnel is running/connected, optionally filtered by partial interface name (name_filter). Returns each client's name, running status, remote server (connect-to), port, mode and user. Use this to read existing OVPN uplinks and their status before calling get_ovpn_client, enable_ovpn_client, disable_ovpn_client, or remove_ovpn_client. For inbound server settings use get_ovpn_server. For L2TP, PPTP, or SSTP tunnels use the respective tools. Returns a redacted table of all matching OVPN client interfaces.",
|
|
14225
14623
|
"inputSchema": {
|
|
14226
14624
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
14227
14625
|
"type": "object",
|
|
@@ -14243,7 +14641,7 @@
|
|
|
14243
14641
|
"idempotentHint": true,
|
|
14244
14642
|
"openWorldHint": false
|
|
14245
14643
|
},
|
|
14246
|
-
"description": "
|
|
14644
|
+
"description": "`get_ovpn_client` — READ / get / show / inspect one OpenVPN (OVPN) client interface's full detail and running status by name (`/interface ovpn-client print detail where name=...`): running/connected state, remote server (connect-to), port, mode, user, profile, certificate, cipher and auth. Use list_ovpn_clients first to enumerate available interface names. For the inbound OVPN server settings use get_ovpn_server. Returns the full interface detail with secrets redacted, or a not-found message if the name does not exist.",
|
|
14247
14645
|
"inputSchema": {
|
|
14248
14646
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
14249
14647
|
"type": "object",
|
|
@@ -21530,7 +21928,7 @@
|
|
|
21530
21928
|
"idempotentHint": true,
|
|
21531
21929
|
"openWorldHint": false
|
|
21532
21930
|
},
|
|
21533
|
-
"description": "Parses a set of intended RouterOS CLI commands locally — without contacting the device — and returns a risk-scored, lock-out-aware execution plan. Classifies each command as ADD/MODIFY/REMOVE/OTHER, calculates an overall risk score, emits warnings when commands would drop input-chain traffic or remove the management IP, and reorders steps into the safest sequence (additive changes before destructive ones). Use this to understand what will happen before committing; to execute the plan use apply_plan. Provide commands as an array via `commands`, as a newline-delimited string via `script`, or both — they are merged. Returns a human-readable plan text and a structured plan object with per-step details.",
|
|
21931
|
+
"description": "Parses a set of intended RouterOS CLI commands locally — without contacting the device — and returns a risk-scored, lock-out-aware execution plan. Classifies each command as ADD/MODIFY/REMOVE/OTHER, calculates an overall risk score, emits warnings when commands would drop input-chain traffic or remove the management IP, and reorders steps into the safest sequence (additive changes before destructive ones). Use this to understand what will happen before committing; to execute the plan use apply_plan. Provide commands as an array via `commands`, as a newline-delimited string via `script`, or both — they are merged. Before planning a change, FIRST call capture_config_snapshot to take a restore point — it stores a local `/export` on the MCP host (~/.mikrotik-mcp/snapshots.db) with zero footprint on the device's disk (no file is written to the router). Returns a human-readable plan text and a structured plan object with per-step details.",
|
|
21534
21932
|
"inputSchema": {
|
|
21535
21933
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
21536
21934
|
"type": "object",
|
|
@@ -21558,7 +21956,7 @@
|
|
|
21558
21956
|
"destructiveHint": true,
|
|
21559
21957
|
"openWorldHint": false
|
|
21560
21958
|
},
|
|
21561
|
-
"description": "Executes intended RouterOS commands inside RouterOS Safe Mode (activated by Ctrl+X over an interactive SSH shell) and reports the exact unified diff of what changed, computed from `/export terse` snapshots captured before and after execution. With confirm=false (default) it applies all steps, captures the diff, then rolls everything back — a true dry-run that shows precisely what would change without persisting anything. With confirm=true it commits permanently, but ONLY after verifying the device still responds to `/system identity print` — a change that would lock you out auto-reverts instead of sticking. Steps execute in the same safe order that plan_changes computes (additive before destructive); if any step returns a RouterOS error the entire plan rolls back immediately. Safe Mode requires SSH — not available on MAC-Telnet devices. For a no-device preview use plan_changes instead. Returns the plan summary, per-step execution log, unified diff, and commit/rollback outcome.",
|
|
21959
|
+
"description": "Executes intended RouterOS commands inside RouterOS Safe Mode (activated by Ctrl+X over an interactive SSH shell) and reports the exact unified diff of what changed, computed from `/export terse` snapshots captured before and after execution. With confirm=false (default) it applies all steps, captures the diff, then rolls everything back — a true dry-run that shows precisely what would change without persisting anything. With confirm=true it commits permanently, but ONLY after verifying the device still responds to `/system identity print` — a change that would lock you out auto-reverts instead of sticking. Steps execute in the same safe order that plan_changes computes (additive before destructive); if any step returns a RouterOS error the entire plan rolls back immediately. Safe Mode requires SSH — not available on MAC-Telnet devices. For a no-device preview use plan_changes instead. ALWAYS call capture_config_snapshot BEFORE this tool to record a restore point — it stores a local `/export` on the MCP host (~/.mikrotik-mcp/snapshots.db), adding no load to the device's disk and leaving nothing to remove on the router; after the change, diff_config_snapshots (from=latest, to=live) confirms what changed. Returns the plan summary, per-step execution log, unified diff, and commit/rollback outcome.",
|
|
21562
21960
|
"inputSchema": {
|
|
21563
21961
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
21564
21962
|
"type": "object",
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "create_mangle_rule",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"chain": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"enum": ["prerouting", "input", "forward", "output", "postrouting"]
|
|
9
|
+
},
|
|
10
|
+
"action": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"enum": [
|
|
13
|
+
"accept",
|
|
14
|
+
"add-dst-to-address-list",
|
|
15
|
+
"add-src-to-address-list",
|
|
16
|
+
"change-dscp",
|
|
17
|
+
"change-mss",
|
|
18
|
+
"change-ttl",
|
|
19
|
+
"clear-df",
|
|
20
|
+
"drop",
|
|
21
|
+
"fasttrack-connection",
|
|
22
|
+
"jump",
|
|
23
|
+
"log",
|
|
24
|
+
"mark-connection",
|
|
25
|
+
"mark-packet",
|
|
26
|
+
"mark-routing",
|
|
27
|
+
"passthrough",
|
|
28
|
+
"return",
|
|
29
|
+
"route",
|
|
30
|
+
"set-priority",
|
|
31
|
+
"sniff-pc",
|
|
32
|
+
"sniff-tzsp"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"src_address": {
|
|
36
|
+
"type": "string"
|
|
37
|
+
},
|
|
38
|
+
"dst_address": {
|
|
39
|
+
"type": "string"
|
|
40
|
+
},
|
|
41
|
+
"src_port": {
|
|
42
|
+
"type": "string"
|
|
43
|
+
},
|
|
44
|
+
"dst_port": {
|
|
45
|
+
"type": "string"
|
|
46
|
+
},
|
|
47
|
+
"protocol": {
|
|
48
|
+
"type": "string"
|
|
49
|
+
},
|
|
50
|
+
"in_interface": {
|
|
51
|
+
"type": "string"
|
|
52
|
+
},
|
|
53
|
+
"out_interface": {
|
|
54
|
+
"type": "string"
|
|
55
|
+
},
|
|
56
|
+
"connection_mark": {
|
|
57
|
+
"type": "string"
|
|
58
|
+
},
|
|
59
|
+
"packet_mark": {
|
|
60
|
+
"type": "string"
|
|
61
|
+
},
|
|
62
|
+
"routing_mark": {
|
|
63
|
+
"type": "string"
|
|
64
|
+
},
|
|
65
|
+
"connection_state": {
|
|
66
|
+
"description": "e.g. \"new\", \"established,related\", \"invalid\"",
|
|
67
|
+
"type": "string"
|
|
68
|
+
},
|
|
69
|
+
"new_connection_mark": {
|
|
70
|
+
"type": "string"
|
|
71
|
+
},
|
|
72
|
+
"new_packet_mark": {
|
|
73
|
+
"type": "string"
|
|
74
|
+
},
|
|
75
|
+
"new_routing_mark": {
|
|
76
|
+
"type": "string"
|
|
77
|
+
},
|
|
78
|
+
"new_dscp": {
|
|
79
|
+
"description": "0-63, for change-dscp",
|
|
80
|
+
"type": "string"
|
|
81
|
+
},
|
|
82
|
+
"new_ttl": {
|
|
83
|
+
"description": "e.g. \"decrement\", \"increment\", or \"set:64\"",
|
|
84
|
+
"type": "string"
|
|
85
|
+
},
|
|
86
|
+
"new_mss": {
|
|
87
|
+
"description": "e.g. \"1440\" or \"clamp-to-pmtu\", for change-mss",
|
|
88
|
+
"type": "string"
|
|
89
|
+
},
|
|
90
|
+
"routing_table": {
|
|
91
|
+
"description": "Routing table for action=route",
|
|
92
|
+
"type": "string"
|
|
93
|
+
},
|
|
94
|
+
"address_list": {
|
|
95
|
+
"description": "Target list name for add-src/dst-to-address-list",
|
|
96
|
+
"type": "string"
|
|
97
|
+
},
|
|
98
|
+
"address_list_timeout": {
|
|
99
|
+
"description": "Entry timeout for add-*-to-address-list e.g. \"1h\", \"none\"",
|
|
100
|
+
"type": "string"
|
|
101
|
+
},
|
|
102
|
+
"passthrough": {
|
|
103
|
+
"type": "boolean"
|
|
104
|
+
},
|
|
105
|
+
"comment": {
|
|
106
|
+
"type": "string"
|
|
107
|
+
},
|
|
108
|
+
"disabled": {
|
|
109
|
+
"default": false,
|
|
110
|
+
"type": "boolean"
|
|
111
|
+
},
|
|
112
|
+
"log": {
|
|
113
|
+
"default": false,
|
|
114
|
+
"type": "boolean"
|
|
115
|
+
},
|
|
116
|
+
"log_prefix": {
|
|
117
|
+
"type": "string"
|
|
118
|
+
},
|
|
119
|
+
"place_before": {
|
|
120
|
+
"description": "Rule number or ID (*N) to insert before",
|
|
121
|
+
"type": "string"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"required": ["chain", "action", "disabled", "log"],
|
|
125
|
+
"additionalProperties": false
|
|
126
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "get_mangle_rule",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"rule_id": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"description": "Rule ID from list output e.g. \"*1\" or \"0\""
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"required": ["rule_id"],
|
|
12
|
+
"additionalProperties": false
|
|
13
|
+
}
|