manage_compliance_monitoring
Monitor Microsoft 365 compliance status with real-time alerts for policy violations and regulatory changes across frameworks like HITRUST, ISO27001, and SOC2.
Instructions
Monitor ongoing compliance status with real-time alerts for policy violations and regulatory changes.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Compliance monitoring action | |
| framework | No | Framework to monitor | |
| filters | No | Monitoring filters | |
| monitoringSettings | No | Monitoring settings |
Implementation Reference
- The primary handler function implementing the manage_compliance_monitoring tool. It processes actions like get_status, get_alerts, get_trends, and configure_monitoring using Microsoft Graph API calls and returns formatted results.export async function handleComplianceMonitoring( graphClient: Client, args: ComplianceMonitoringArgs ): Promise<{ content: { type: string; text: string }[] }> { let result: any; switch (args.action) { case 'get_status': // Get overall compliance status result = await getComplianceStatus(graphClient, args.framework, args.filters); break; case 'get_alerts': // Get compliance alerts result = await getComplianceAlerts(graphClient, args.framework, args.filters); break; case 'get_trends': // Get compliance trends result = await getComplianceTrends(graphClient, args.framework, args.filters); break; case 'configure_monitoring': // Configure monitoring settings result = { framework: args.framework, monitoringSettings: args.monitoringSettings, status: 'configured', message: 'Monitoring configured successfully' }; break; default: throw new McpError(ErrorCode.InvalidParams, `Invalid action: ${args.action}`); } return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
- src/tool-definitions.ts:415-421 (schema)Zod schema defining the input validation and parameters for the manage_compliance_monitoring tool, including supported actions and optional framework/filters.export const complianceMonitoringSchema = z.object({ action: z.enum(['get_status', 'get_alerts', 'get_trends', 'configure_monitoring']).describe('Compliance monitoring action'), framework: z.enum(['hitrust', 'iso27001', 'soc2']).optional().describe('Framework to monitor'), filters: z.record(z.string(), z.unknown()).optional().describe('Monitoring filters'), monitoringSettings: z.record(z.string(), z.unknown()).optional().describe('Monitoring settings'), });
- src/tool-metadata.ts:181-185 (schema)Tool metadata providing description, title, and operational annotations (read-only, non-destructive, idempotent) for MCP tool discovery and client integration.manage_compliance_monitoring: { description: "Monitor ongoing compliance status with real-time alerts for policy violations and regulatory changes.", title: "Compliance Monitor", annotations: { title: "Compliance Monitor", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true } },
- src/handlers.ts:47-60 (registration)Import statement registering the handleComplianceMonitoring handler from compliance-handler.ts, making it available for tool registry and MCP server setup.import { handleComplianceFrameworks, handleComplianceAssessments, handleComplianceMonitoring, handleEvidenceCollection, handleGapAnalysis } from './handlers/compliance-handler.js'; import { ComplianceFrameworkArgs, ComplianceAssessmentArgs, ComplianceMonitoringArgs, EvidenceCollectionArgs, GapAnalysisArgs } from './types/compliance-types.js';
- src/tool-metadata.ts:302-312 (helper)Utility functions to retrieve tool metadata by name and list all available tools, supporting dynamic tool discovery including manage_compliance_monitoring.export function getToolMetadata(toolName: string): ToolMetadata | undefined { return toolMetadata[toolName]; } /** * Get all tool names with metadata */ export function getAllToolNames(): string[] { return Object.keys(toolMetadata); }