Skip to main content
Glama
ethanolivertroy

FedRAMP Docs MCP Server

analyze_control_coverage

Analyzes NIST control families to identify FedRAMP compliance coverage, generating reports on addressed controls and mapping counts.

Instructions

Analyze which NIST control families have FedRAMP requirements. Returns a coverage report showing which control families are addressed and how many controls/mappings exist for each.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The async execute function implementing the tool's core logic: fetches control mappings, groups by NIST control family (e.g., 'AC'), computes per-family and total coverage statistics (controls, mappings, sources), and returns structured report.
    execute: async () => {
      const mappings = getControlMappings();
    
      // Group by control family (first 2 characters, e.g., AC, SC, IA)
      const familyMap = new Map<
        string,
        { controls: Set<string>; mappings: number; sources: Set<string> }
      >();
    
      for (const mapping of mappings) {
        const family = mapping.control.split("-")[0];
        if (!familyMap.has(family)) {
          familyMap.set(family, {
            controls: new Set(),
            mappings: 0,
            sources: new Set(),
          });
        }
        const entry = familyMap.get(family)!;
        entry.controls.add(mapping.control);
        entry.mappings++;
        entry.sources.add(mapping.source);
      }
    
      const families: FamilyCoverage[] = [...familyMap.entries()]
        .map(([family, data]) => ({
          family,
          controlCount: data.controls.size,
          mappingCount: data.mappings,
          controls: [...data.controls].sort(),
          sources: [...data.sources].sort(),
        }))
        .sort((a, b) => b.mappingCount - a.mappingCount);
    
      const totalControls = new Set(mappings.map((m) => m.control)).size;
    
      return {
        totalFamilies: families.length,
        totalControls,
        totalMappings: mappings.length,
        families,
      };
    },
  • Defines FamilyCoverage interface for output, empty Zod input schema (z.object({})), and ToolDefinition type with input/output shapes.
    interface FamilyCoverage {
      family: string;
      controlCount: number;
      mappingCount: number;
      controls: string[];
      sources: string[];
    }
    
    const schema = z.object({});
    
    export const analyzeControlCoverageTool: ToolDefinition<
      typeof schema,
      {
        totalFamilies: number;
        totalControls: number;
        totalMappings: number;
        families: FamilyCoverage[];
      }
    > = {
  • Registers analyzeControlCoverageTool (imported from ./analyze_control_coverage.js) in the MCP server by including it in the tools array passed to registerToolDefs.
    export function registerTools(server: McpServer): void {
      registerToolDefs(server, [
        // Document discovery
        listFrmrDocumentsTool,
        getFrmrDocumentTool,
        listVersionsTool,
        // KSI tools
        listKsiTool,
        getKsiTool,
        filterByImpactTool,
        getThemeSummaryTool,
        getEvidenceExamplesTool,
        // Control mapping tools
        listControlsTool,
        getControlRequirementsTool,
        analyzeControlCoverageTool,
        // Search & lookup tools
        searchMarkdownTool,
        readMarkdownTool,
        searchDefinitionsTool,
        getRequirementByIdTool,
        // Analysis tools
        diffFrmrTool,
        grepControlsTool,
        significantChangeTool,
        // System tools
        healthCheckTool,
        updateRepositoryTool,
      ]);
    }

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/ethanolivertroy/fedramp-docs-mcp'

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