Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
d603765
refactor: merge 3 SLE tools into unified mist_get_sle
tmunzer-AIDE Jun 10, 2026
f4891a9
feat: merge get_org_or_site_info into get_configuration_objects
tmunzer-AIDE Jun 10, 2026
79a2ed6
refactor: merge list_site_sle_info into mist_get_sle
tmunzer-AIDE Jun 10, 2026
5483126
fix: improve SLE tool descriptions for accuracy
tmunzer-AIDE Jun 10, 2026
4384099
fix: clarify SLE metadata scopes
tmunzer-AIDE Jun 10, 2026
d44c77e
feat: add operation IDs for change configuration objects
tmunzer-AIDE Jun 10, 2026
2bf078f
fix: correct getSiteSettings to getSiteSetting and add missing operat…
tmunzer-AIDE Jun 10, 2026
7281288
feat: add get_sle operation with associated template and operation IDs
tmunzer-AIDE Jun 10, 2026
1bb3613
fix: improve formatting and readability in utility functions
tmunzer-AIDE Jun 10, 2026
5e25da8
Implement code changes to enhance functionality and improve performance
tmunzer-AIDE Jun 10, 2026
7b8bb7f
refactor: clean up and optimize SLE-related code and configurations
tmunzer-AIDE Jun 10, 2026
d7c72c9
Potential fix for pull request finding
tmunzer-AIDE Jun 10, 2026
db73cbc
Potential fix for pull request finding
tmunzer-AIDE Jun 10, 2026
e615687
Potential fix for pull request finding
tmunzer-AIDE Jun 10, 2026
23659ab
Potential fix for pull request finding
tmunzer-AIDE Jun 10, 2026
458f90e
docs: update object type descriptions for organization and site-level…
tmunzer-AIDE Jun 10, 2026
2a21a03
docs: remove deprecated tool from account and navigation section in R…
tmunzer-AIDE Jun 10, 2026
6ee513a
refactor: streamline response assignment for impacted objects and add…
tmunzer-AIDE Jun 10, 2026
0878f1d
Refactor guest authorization and client search tools
tmunzer-AIDE Jun 10, 2026
036f167
docs: clarify SLE guidance
tmunzer-AIDE Jun 10, 2026
8c86c4b
refactor: update search_client parameters and descriptions for clarit…
tmunzer-AIDE Jun 10, 2026
c0cf6c4
Merge commit '036f1677ae9fbba914c1a7a92ad79d1575d0fc06' into tmunzer-…
tmunzer-AIDE Jun 10, 2026
c0ddc06
Merge branch 'main' into tmunzer-aide/merge-sle-tools
tmunzer-AIDE Jun 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ The server exposes a focused set of tools grouped by workflow. This is the quick

| Workflow | Main tools | What they are used for |
| - | - | - |
| Account and navigation | `mist_get_self`, `mist_get_org_or_site_info`, `mist_get_next_page`, `mist_get_constants` | Resolve account details, discover IDs, follow pagination, and look up fixed Mist constants before making deeper queries. |
| Device and client lookup | `mist_search_device`, `mist_search_client`, `mist_search_guest_authorization`, `mist_search_nac_user_macs` | Find devices, clients, guest authorizations, and NAC-related client entries by name, MAC, IP, serial, model, or other filters. |
| Account and navigation | `mist_get_self`, `mist_get_next_page`, `mist_get_constants` | Resolve account details, discover IDs, follow pagination, and look up fixed Mist constants before making deeper queries. |
| Device and client lookup | `mist_search_device`, `mist_search_client`, `mist_search_nac_user_macs` | Find devices, clients, guest authorizations, and NAC-related client entries by name, MAC, IP, serial, model, or other filters. |
| Configuration read | `mist_get_configuration_objects`, `mist_get_configuration_object_schema`, `mist_search_device_config_history` | Inspect org or site configuration, discover valid schema fields, and review recent configuration history on devices. |
| Configuration changes | `mist_update_configuration_objects`, `mist_change_configuration_objects` | Create, update, and delete supported configuration objects. These tools require `--enable-write-tools`. |
| Monitoring and events | `mist_search_events`, `mist_search_audit_logs`, `mist_search_alarms`, `mist_get_stats` | Investigate events, audit history, alarms, and operational statistics across organizations, sites, devices, clients, and ports. |
| Assurance and AI insights | `mist_get_site_sle`, `mist_list_site_sle_info`, `mist_get_org_sle`, `mist_get_org_sites_sle`, `mist_get_insight_metrics`, `mist_get_site_rrm_info`, `mist_troubleshoot` | Explore SLEs, Mist AI insight metrics, radio resource management state, and Marvis troubleshooting output. |
| Assurance and AI insights | `mist_get_sle`, `mist_get_insight_metrics`, `mist_get_site_rrm_info`, `mist_troubleshoot` | Explore SLEs, Mist AI insight metrics, radio resource management state, and Marvis troubleshooting output. |
| Device operations | `mist_utilities`, `mist_list_upgrades` | Run device-side diagnostics and maintenance helpers or inspect upgrade information. Call `mist_utilities` with only `device_type` to list the supported platform-specific utilities. Some state-changing utility actions require write tools, and the disruptive ones also trigger elicitation. |
| Inventory and security context | `mist_get_org_licenses`, `mist_list_rogue_devices` | Review organization license usage and detect or inspect rogue AP activity seen by a site. |

Expand Down
35 changes: 27 additions & 8 deletions mcp_generator/generate_from_openapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@
# - running as script: `python mcp_generator/generate_from_openapi.py`
# - running as module: `python -m mcp_generator.generate_from_openapi`
try:
from templates.tmpl_tool_upgrade import TOOL_TEMPLATE_UPGRADE, UPGRADE_OPERATIONS
from templates.tmpl_tool_utilities import UTILITIES_TEMPLATE
from templates.tmpl_search_client import (
SEARCH_CLIENT_OPERATION_IDS,
SEARCH_CLIENT_TEMPLATE,
)

from mcp_generator.templates.tmpl_get_configuration_object_schema import (
GET_CONFIGURATION_OBJECT_SCHEMA_TEMPLATE,
Expand All @@ -52,6 +54,10 @@
GET_CONFIGURATION_OBJECTS_OPERATION_IDS,
GET_CONFIGURATION_OBJECTS_TEMPLATE,
)
from mcp_generator.templates.tmpl_get_sle import (
GET_SLE_OPERATION_IDS,
GET_SLE_TEMPLATE,
)
from mcp_generator.templates.tmpl_getnextpage import GET_NEXT_PAGE_TEMPLATE
from mcp_generator.templates.tmpl_helper import TOOLS_HELPER
from mcp_generator.templates.tmpl_init import INIT_TEMPLATE
Expand All @@ -60,6 +66,7 @@
REQ_TEMPLATE,
)
from mcp_generator.templates.tmpl_tool_change_configuration_objects import (
CHANGE_CONFIGURATION_OBJECTS_OPERATION_IDS,
CHANGE_CONFIGURATION_OBJECTS_TEMPLATE,
CHANGE_OPERATIONS,
)
Expand All @@ -70,6 +77,7 @@
from mcp_generator.templates.tmpl_tool_update_configuration_objects import (
UPDATE_CONFIGURATION_OBJECTS_TEMPLATE,
)
from mcp_generator.templates.tmpl_tool_utilities import UTILITIES_TEMPLATE
from mcp_generator.templates.tmpl_tool_write import TOOL_TEMPLATE_WRITE
from mcp_generator.templates.tmpl_tool_write_delete import (
TOOL_TEMPLATE_WRITE_DELETE,
Expand All @@ -82,11 +90,17 @@
GET_CONFIGURATION_OBJECTS_OPERATION_IDS,
GET_CONFIGURATION_OBJECTS_TEMPLATE,
)
from templates.tmpl_get_sle import GET_SLE_OPERATION_IDS, GET_SLE_TEMPLATE
from templates.tmpl_getnextpage import GET_NEXT_PAGE_TEMPLATE
from templates.tmpl_helper import TOOLS_HELPER
from templates.tmpl_init import INIT_TEMPLATE
from templates.tmpl_req import REQ_OPTIMIZED_TEMPLATE, REQ_TEMPLATE
from templates.tmpl_search_client import (
SEARCH_CLIENT_OPERATION_IDS,
SEARCH_CLIENT_TEMPLATE,
)
from templates.tmpl_tool_change_configuration_objects import (
CHANGE_CONFIGURATION_OBJECTS_OPERATION_IDS,
CHANGE_CONFIGURATION_OBJECTS_TEMPLATE,
CHANGE_OPERATIONS,
)
Expand All @@ -99,7 +113,6 @@
from templates.tmpl_tool_utilities import UTILITIES_TEMPLATE
from templates.tmpl_tool_write import TOOL_TEMPLATE_WRITE
from templates.tmpl_tool_write_delete import TOOL_TEMPLATE_WRITE_DELETE

# ---------------------------------------------------------------------------
# CONFIGURATION CONSTANTS
# ---------------------------------------------------------------------------
Expand Down Expand Up @@ -149,7 +162,7 @@
"name": "change_configuration_objects",
"template": CHANGE_CONFIGURATION_OBJECTS_TEMPLATE,
"tag": "write_delete",
"operation_ids": CHANGE_OPERATIONS,
"operation_ids": CHANGE_CONFIGURATION_OBJECTS_OPERATION_IDS,
},
{
"name": "update_configuration_objects",
Expand All @@ -164,10 +177,16 @@
"operation_ids": [],
},
{
"name": "upgrades",
"template": TOOL_TEMPLATE_UPGRADE,
"tag": "utilities_upgrade",
"operation_ids": UPGRADE_OPERATIONS,
"name": "get_sle",
"template": GET_SLE_TEMPLATE,
"tag": "sles",
"operation_ids": GET_SLE_OPERATION_IDS,
},
{
"name": "search_client",
"template": SEARCH_CLIENT_TEMPLATE,
"tag": "clients",
"operation_ids": SEARCH_CLIENT_OPERATION_IDS,
},
]
# Global read-only hint for tool generation
Expand Down
43 changes: 38 additions & 5 deletions mcp_generator/templates/tmpl_get_configuration_objets.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
GET_CONFIGURATION_OBJECTS_OPERATION_IDS = [
"getOrg",
"getOrgSettings",
"getSiteInfo",
"getSiteSetting",
"listOrgSites",
"searchSiteDevices",
"listSiteWxTags",
"getSiteWxTag",
"listSiteWxRules",
Expand Down Expand Up @@ -103,7 +109,8 @@


class Object_type(Enum):
ORG = "org"
ORG_INFO = "org_info"
ORG_SETTINGS = "org_settings"
ORG_ALARMTEMPLATES = "org_alarmtemplates"
ORG_WLANS = "org_wlans"
ORG_SITEGROUPS = "org_sitegroups"
Expand Down Expand Up @@ -131,6 +138,8 @@ class Object_type(Enum):
ORG_WLANTEMPLATES = "org_wlantemplates"
ORG_WXRULES = "org_wxrules"
ORG_WXTAGS = "org_wxtags"
SITE_INFO = "site_info"
SITE_SETTINGS = "site_settings"
SITE_EVPN_TOPOLOGIES = "site_evpn_topologies"
SITE_MAPS = "site_maps"
SITE_MXEDGES = "site_mxedges"
Expand Down Expand Up @@ -226,7 +235,7 @@ async def get_configuration_objects(
str,
Field(
default=None,
description="""Name of the specific configuration object to retrieve. Not supported when `object_type` is `site_devices` (use the `mist_search_device` tool if you need to find a specific device). If not provided, all objects of the specified type will be retrieved. Case insensitive. Use `prefix*` for prefix search or `*substring*` for contains search (e.g. `aabbcc*` and `*bbcc*` match `aabbccddeeff`). Suffix-only wildcards (e.g. `*bccddeeff`) are not supported""",
description="""Name of the specific configuration object to retrieve. Not supported when `object_type` is `org_info`, `org_settings`, `site_info`, `site_settings` or `site_devices` (use the `mist_search_device` tool if you need to find a specific device). If not provided, all objects of the specified type will be retrieved. Case insensitive. Use `prefix*` for prefix search or `*substring*` for contains search (e.g. `aabbcc*` and `*bbcc*` match `aabbccddeeff`). Suffix-only wildcards (e.g. `*bccddeeff`) are not supported""",
),
],
computed: Annotated[
Expand All @@ -240,14 +249,23 @@ async def get_configuration_objects(
int,
Field(
default=20,
description="""Max number of results per page. Default is 20, Max is 1000""",
description="""Max number of results per page. Default is 20, Max is 1000. Not supported when `object_type` is `org_info`, `org_settings`, `site_info` or `site_settings`""",
),
] = 20,
) -> dict | list | str:
"""Retrieve configuration objects from a specified organization or site. For the site configuration objects, set the attribute `computed` to `true` to retrieve the computed configuration including all configuration objects defined at the org level and assigned to the site. This tool allows you to retrieve a list of configuration objects (e.g. wlans, device profiles, network templates) or to filter them providing their ID."""

logger.debug("Tool get_configuration_objects called")
logger.debug("Input Parameters: org_id=%s, object_type=%s, site_id=%s, object_id=%s, name=%s, computed=%s, limit=%s", org_id, object_type, site_id, object_id, name, computed, limit)
logger.debug(
"Input Parameters: org_id=%s, object_type=%s, site_id=%s, object_id=%s, name=%s, computed=%s, limit=%s",
org_id,
object_type,
site_id,
object_id,
name,
computed,
limit,
)

apisession, response_format = await get_apisession()

Expand Down Expand Up @@ -306,7 +324,12 @@ async def _org_configuration_objects_getter(
limit: int = 20,
) -> _APIResponse:
match object_type:
case "org":
case "org_info":
response = mistapi.api.v1.orgs.orgs.getOrg(
apisession, org_id=str(org_id)
)
await process_response(response)
case "org_settings":
response = mistapi.api.v1.orgs.setting.getOrgSettings(
apisession, org_id=str(org_id)
)
Expand Down Expand Up @@ -931,6 +954,16 @@ async def _site_configuration_objects_getter(
limit: int = 20,
) -> _APIResponse:
match object_type:
case "site_info":
response = mistapi.api.v1.sites.sites.getSiteInfo(
apisession, site_id=str(site_id)
)
await process_response(response)
case "site_settings":
response = mistapi.api.v1.sites.setting.getSiteSetting(
apisession, site_id=str(site_id)
)
await process_response(response)
case "site_devices":
return await _get_site_devices(
apisession, org_id, site_id, object_id, name, computed, limit
Expand Down
Loading
Loading