sentinel_ml_analytics_settings_list
List all machine learning analytics settings in your Microsoft Sentinel workspace to configure and manage security monitoring rules.
Instructions
List all Sentinel ML analytics settings in the current workspace.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kwargs | Yes |
Implementation Reference
- tools/workspace_tools.py:410-451 (handler)The async run method of SentinelMLAnalyticsSettingsListTool that implements the core tool logic. It fetches Azure context, lists ML analytics settings via the security_ml_analytics_settings.list API, extracts key fields (id, name, description, enabled), and returns a structured result with validation and error handling.async def run(self, ctx: Context, **kwargs): """ List all ML analytics settings in the current Sentinel workspace. Returns MCP-compliant dict with 'settings', 'valid', 'errors', and 'error'. """ logger = self.logger result = {"settings": [], "valid": False, "errors": []} workspace_name, resource_group, subscription_id = self.get_azure_context(ctx) if not (workspace_name and resource_group and subscription_id): error_msg = ( "Missing required Azure context (workspace_name, resource_group, " "subscription_id)." ) logger.error(error_msg) result["error"] = error_msg result["errors"].append(error_msg) return result try: client = self.get_securityinsight_client(subscription_id) # Use the preview API version for ML Analytics support ml_settings_paged = client.security_ml_analytics_settings.list( resource_group, workspace_name ) settings = [] for s in ml_settings_paged: s_dict = s.as_dict() if hasattr(s, "as_dict") else dict(s) settings.append( { "id": s_dict.get("id"), "name": s_dict.get("name"), "description": s_dict.get("description"), "enabled": s_dict.get("enabled"), } ) result["settings"] = settings result["valid"] = True except Exception as ex: error_msg = f"Error listing ML analytics settings: {ex}" logger.exception(error_msg) result["error"] = error_msg result["errors"].append(error_msg) return result
- tools/workspace_tools.py:577-577 (registration)Registers the SentinelMLAnalyticsSettingsListTool class with the MCP server instance inside the register_tools function.SentinelMLAnalyticsSettingsListTool.register(mcp)
- tools/workspace_tools.py:407-408 (schema)Tool name and description definition, used by MCPToolBase for tool schema, input/output expectations, and registration.name = "sentinel_ml_analytics_settings_list" description = "List all Sentinel ML analytics settings in the current workspace."