Skip to main content
Glama
DynamicEndpoints

Microsoft 365 Core MCP Server

manage_compliance_frameworks

Idempotent

Configure and assess compliance frameworks like HIPAA, GDPR, and ISO 27001 to meet regulatory requirements in Microsoft 365 environments.

Instructions

Manage compliance frameworks and standards including HIPAA, GDPR, SOX, PCI-DSS, ISO 27001, and NIST configurations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesCompliance framework management action
frameworkYesCompliance framework type
scopeNoAssessment scope (organization, specific systems)
settingsNoFramework settings

Implementation Reference

  • Main handler function implementing the manage_compliance_frameworks tool logic. Handles actions: list, configure, status, assess, activate, deactivate compliance frameworks (HITRUST, ISO27001, SOC2, CIS). Integrates with Microsoft Graph for secure scores and controls.
    // Compliance Framework Management Handler
    export async function handleComplianceFrameworks(
      graphClient: Client,
      args: ComplianceFrameworkArgs
    ): Promise<{ content: { type: string; text: string }[] }> {
      let result: any;
    
      switch (args.action) {
        case 'list':
          // List available compliance frameworks
          result = {
            frameworks: [
              {
                id: 'hitrust',
                name: 'HITRUST CSF',
                version: '11.1',
                description: 'Health Information Trust Alliance Common Security Framework',
                controlFamilies: 49,
                totalControls: 156,
                status: 'available'
              },
              {
                id: 'iso27001',
                name: 'ISO 27001:2022',
                version: '2022',
                description: 'Information Security Management System',
                controlFamilies: 14,
                totalControls: 114,
                status: 'available'
              },
              {
                id: 'soc2',
                name: 'SOC 2 Type II',
                version: '2017',
                description: 'Service Organization Control 2',
                controlFamilies: 5,
                totalControls: 64,
                status: 'available'
              }
            ]
          };
          break;
    
        case 'configure':
          // Configure compliance framework settings
          const frameworkConfig = {
            framework: args.framework,
            scope: args.scope || ['all'],
            settings: args.settings,
            configuredDate: new Date().toISOString(),
            status: 'configured'
          };
          
          // In a real implementation, this would be stored in a database
          result = { message: 'Framework configured successfully', config: frameworkConfig };
          break;
    
        case 'status':
          // Get compliance framework status
          result = await getFrameworkStatus(graphClient, args.framework);
          break;
    
        case 'assess':
          // Trigger compliance assessment
          result = await triggerAssessment(graphClient, args.framework, args.scope || []);
          break;
    
        case 'activate':
          result = { message: `${args.framework} framework activated`, status: 'active' };
          break;
    
        case 'deactivate':
          result = { message: `${args.framework} framework deactivated`, status: 'inactive' };
          break;
    
        default:
          throw new McpError(ErrorCode.InvalidParams, `Invalid action: ${args.action}`);
      }
    
      return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
    }
  • TypeScript interface defining input schema for the tool: action (enum), framework (HITRUST/ISO/SOC2/CIS), optional scope and settings.
    // Compliance Framework Management Types
    export interface ComplianceFrameworkArgs {
      action: 'list' | 'configure' | 'status' | 'assess' | 'activate' | 'deactivate';
      framework: 'hitrust' | 'iso27001' | 'soc2' | 'cis';
      scope?: string[];
      settings?: Record<string, unknown>;
    }
  • src/server.ts:898-917 (registration)
    Registers the 'manage_compliance_frameworks' tool with MCP server, linking to handleComplianceFrameworks handler, schema, and metadata.
    this.server.tool(
      "manage_compliance_frameworks",
      "Manage compliance frameworks and standards including HIPAA, GDPR, SOX, PCI-DSS, ISO 27001, and NIST configurations.",
      complianceFrameworkSchema.shape,
      {"readOnlyHint":false,"destructiveHint":false,"idempotentHint":true},
      wrapToolHandler(async (args: ComplianceFrameworkArgs) => {
        this.validateCredentials();
        try {
          return await handleComplianceFrameworks(this.getGraphClient(), args);
        } catch (error) {
          if (error instanceof McpError) {
            throw error;
          }
          throw new McpError(
            ErrorCode.InternalError,
            `Error executing tool: ${error instanceof Error ? error.message : 'Unknown error'}`
          );
        }
      })
    );
  • src/handlers.ts:47-53 (registration)
    Imports the handleComplianceFrameworks function from compliance-handler.ts for use in main handlers index.
    import {
      handleComplianceFrameworks,
      handleComplianceAssessments,
      handleComplianceMonitoring,
      handleEvidenceCollection,
      handleGapAnalysis
    } from './handlers/compliance-handler.js';
  • Helper function getFrameworkStatus that fetches Secure Score and control profiles from Microsoft Graph API to compute framework status.
    async function getFrameworkStatus(graphClient: Client, framework: string) {
      // Get data from Microsoft Compliance Manager and other sources
      const secureScore = await graphClient.api('/security/secureScores').top(1).get();
      const controls = await graphClient.api('/security/secureScoreControlProfiles').get();
      
      return {
        framework,
        overallScore: secureScore.value[0]?.currentScore || 0,
        maxScore: secureScore.value[0]?.maxScore || 100,
        compliancePercentage: Math.round((secureScore.value[0]?.currentScore / secureScore.value[0]?.maxScore) * 100) || 0,
        lastAssessmentDate: new Date().toISOString(),
        controlSummary: {
          total: controls.value?.length || 0,
          compliant: controls.value?.filter((c: any) => c.implementationStatus === 'implemented').length || 0,
          nonCompliant: controls.value?.filter((c: any) => c.implementationStatus === 'notImplemented').length || 0,
          partiallyCompliant: controls.value?.filter((c: any) => c.implementationStatus === 'partiallyImplemented').length || 0
        }
      };
    }
    
    async function triggerAssessment(graphClient: Client, framework: string, scope: string[]) {
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=false, idempotentHint=true, and destructiveHint=false, so the agent knows this is a mutable but safe operation. The description adds minimal behavioral context beyond annotations - it implies configuration and assessment capabilities through the listed framework names, but doesn't describe side effects, permission requirements, or operational constraints. No contradiction with annotations exists.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that states the core purpose with relevant examples. It's appropriately sized and front-loaded with the essential information. There's no wasted verbiage or unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 4 parameters, no output schema, and annotations covering basic safety properties, the description provides adequate but minimal context. It establishes the domain (compliance frameworks) but doesn't address return values, error conditions, or operational nuances. Given the complexity implied by the action enum and nested settings object, more guidance would be beneficial.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema description coverage, the schema already documents all 4 parameters thoroughly. The description adds no parameter-specific information beyond what's in the schema - it doesn't explain how 'action' values map to different operations, what 'scope' should contain, or how 'settings' should be structured. The baseline of 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Manage compliance frameworks and standards' with specific examples (HIPAA, GDPR, SOX, PCI-DSS, ISO 27001, NIST). It provides a specific verb ('manage') and resource ('compliance frameworks and standards'), but doesn't explicitly differentiate from sibling tools like 'manage_cis_compliance' or 'manage_compliance_assessments' beyond listing different framework names.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention any prerequisites, context for selection, or comparison with sibling tools like 'manage_compliance_assessments' or 'manage_cis_compliance'. The user must infer usage from the tool name and parameter schema alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/DynamicEndpoints/m365-core-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server