manage_compliance_monitoring
Monitor 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 core handler function that implements the manage_compliance_monitoring tool. It processes input arguments, dispatches to appropriate helper functions based on action (get_status, get_alerts, get_trends, configure_monitoring), 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) }] }; }
- TypeScript interface defining the input schema for the manage_compliance_monitoring tool, including action types and optional parameters.export interface ComplianceMonitoringArgs { action: 'get_status' | 'get_alerts' | 'get_trends' | 'configure_monitoring'; framework?: 'hitrust' | 'iso27001' | 'soc2'; filters?: Record<string, unknown>; monitoringSettings?: Record<string, unknown>; }
- src/tool-metadata.ts:181-184 (schema)Tool metadata providing description, title, and behavioral annotations (read-only, non-destructive, idempotent) for the manage_compliance_monitoring tool.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 function for use in the MCP tool server.import { handleComplianceFrameworks, handleComplianceAssessments, handleComplianceMonitoring, handleEvidenceCollection, handleGapAnalysis } from './handlers/compliance-handler.js'; import { ComplianceFrameworkArgs, ComplianceAssessmentArgs, ComplianceMonitoringArgs, EvidenceCollectionArgs, GapAnalysisArgs } from './types/compliance-types.js';
- Helper function called by the handler to retrieve current compliance status data.async function getComplianceStatus(graphClient: Client, framework?: string, filters?: any) { // Get current compliance status return { framework, overallScore: 85, riskLevel: 'medium', lastAssessmentDate: new Date().toISOString(), nextAssessmentDate: new Date(Date.now() + 30 * 24 * 3600000).toISOString(), // 30 days activeAlerts: [], trends: [] }; }