Skip to main content
Glama
DynamicEndpoints

Microsoft 365 Core MCP Server

manage_compliance_assessments

Read-onlyIdempotent

Conduct compliance assessments against frameworks like HITRUST, ISO27001, and SOC2 to generate detailed reports on regulatory adherence and security controls.

Instructions

Conduct compliance assessments and generate detailed reports on regulatory adherence and security controls.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesCompliance assessment action
assessmentIdNoAssessment ID for tracking
frameworkYesFramework to assess against
scopeYesAssessment scope
settingsNoAssessment settings

Implementation Reference

  • Main handler function implementing the core logic for manage_compliance_assessments tool. Handles actions: create, execute, get_results, schedule, cancel. Integrates with Graph API for assessments.
    // Compliance Assessment Handler
    export async function handleComplianceAssessments(
      graphClient: Client,
      args: ComplianceAssessmentArgs
    ): Promise<{ content: { type: string; text: string }[] }> {
      let result: any;
    
      switch (args.action) {
        case 'create':
          // Create new compliance assessment
          const assessmentId = `assessment-${Date.now()}`;
          result = {
            id: assessmentId,
            framework: args.framework,
            scope: args.scope,
            settings: args.settings,
            status: 'created',
            createdDate: new Date().toISOString()
          };
          break;
    
        case 'execute':
          if (!args.assessmentId) {
            throw new McpError(ErrorCode.InvalidParams, 'assessmentId is required for execute action');
          }
          
          // Execute assessment
          result = await executeAssessment(graphClient, args.assessmentId, args.framework);
          break;
    
        case 'get_results':
          if (!args.assessmentId) {
            throw new McpError(ErrorCode.InvalidParams, 'assessmentId is required for get_results action');
          }
          
          result = await getAssessmentResults(graphClient, args.assessmentId);
          break;
    
        case 'schedule':
          result = {
            assessmentId: args.assessmentId,
            scheduledDate: args.settings?.scheduledDate,
            status: 'scheduled',
            message: 'Assessment scheduled successfully'
          };
          break;
    
        case 'cancel':
          result = {
            assessmentId: args.assessmentId,
            status: 'cancelled',
            message: 'Assessment cancelled successfully'
          };
          break;
    
        default:
          throw new McpError(ErrorCode.InvalidParams, `Invalid action: ${args.action}`);
      }
    
      return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
    }
  • Zod schema defining input parameters for the manage_compliance_assessments tool.
    export const complianceAssessmentSchema = z.object({
      action: z.enum(['create', 'update', 'execute', 'schedule', 'cancel', 'get_results']).describe('Compliance assessment action'),
      assessmentId: z.string().optional().describe('Assessment ID for tracking'),
      framework: z.enum(['hitrust', 'iso27001', 'soc2']).describe('Framework to assess against'),
      scope: z.record(z.string(), z.unknown()).describe('Assessment scope'),
      settings: z.record(z.string(), z.unknown()).optional().describe('Assessment settings'),
    });
  • src/handlers.ts:46-60 (registration)
    Imports the handleComplianceAssessments handler function and ComplianceAssessmentArgs type, indicating registration for the manage_compliance_assessments tool.
    // Import compliance handlers and types
    import {
      handleComplianceFrameworks,
      handleComplianceAssessments,
      handleComplianceMonitoring,
      handleEvidenceCollection,
      handleGapAnalysis
    } from './handlers/compliance-handler.js';
    import {
      ComplianceFrameworkArgs,
      ComplianceAssessmentArgs,
      ComplianceMonitoringArgs,
      EvidenceCollectionArgs,
      GapAnalysisArgs
    } from './types/compliance-types.js';
  • Tool metadata providing description, title, and annotations for manage_compliance_assessments.
    manage_compliance_assessments: {
      description: "Conduct compliance assessments and generate detailed reports on regulatory adherence and security controls.",
      title: "Compliance Assessment Tool",
      annotations: { title: "Compliance Assessment Tool", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true }
  • Helper function executeAssessment called by the main handler for executing compliance assessments.
    async function executeAssessment(graphClient: Client, assessmentId: string, framework: string) {
      // Execute compliance assessment
      return {
        assessmentId,
        framework,
        status: 'completed',
        completedDate: new Date().toISOString(),
        results: {
          overallScore: 85,
          controlsAssessed: 114,
          controlsPassed: 97,
          controlsFailed: 17,
          recommendations: 12
        }
      };
    }
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the agent knows this is a safe, repeatable operation. The description adds minimal behavioral context beyond this—it mentions 'conduct' and 'generate reports' but doesn't specify permissions needed, rate limits, or what 'detailed reports' entail. With annotations covering safety, a 3 is appropriate for limited added value.

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 clearly states the tool's purpose without unnecessary words. It's front-loaded with the core functionality, making it easy to parse quickly, and every part of the sentence contributes to understanding.

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?

Given the tool's complexity (5 parameters with nested objects) and lack of output schema, the description is somewhat incomplete. It doesn't explain what 'detailed reports' contain or how results are returned, which could hinder agent usage. However, annotations provide safety context, and the schema covers parameters well, making it minimally adequate.

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?

Schema description coverage is 100%, with all parameters well-documented in the schema (e.g., action enum values, framework options). The description doesn't add any meaningful parameter semantics beyond what the schema provides, such as explaining 'scope' or 'settings' objects. Baseline 3 is correct when the schema handles parameter documentation fully.

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 with specific verbs ('conduct' and 'generate') and resources ('compliance assessments' and 'detailed reports'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'manage_compliance_frameworks' or 'manage_compliance_monitoring', which prevents a perfect score.

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. There's no mention of prerequisites, timing, or comparison to sibling tools like 'manage_compliance_frameworks' or 'manage_compliance_monitoring', leaving the agent with no contextual usage information.

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