Skip to main content
Glama
ethanolivertroy

FedRAMP Docs MCP Server

list_ksi

Filter and list specific FedRAMP Key Security Indicator requirements by ID, category, or status to identify compliance needs.

Instructions

List individual KSI requirement entries (like KSI-IAM-01, KSI-CNA-02) with optional filters. To see all KSI categories and their descriptions, use get_frmr_document with path 'FRMR.KSI.key-security-indicators.json' instead. This tool filters specific requirements within categories.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNo
textNo
categoryNo
statusNo
limitNo
offsetNo

Implementation Reference

  • Full implementation of the 'list_ksi' tool handler, including Zod input schema validation, description, and the execute function that processes input and delegates to listKsiItems.
    const schema = z.object({
      id: z.string().optional(),
      text: z.string().optional(),
      category: z.string().optional(),
      status: z.string().optional(),
      limit: z.number().int().min(1).max(200).default(100),
      offset: z.number().int().min(0).default(0),
    });
    
    export const listKsiTool: ToolDefinition<
      typeof schema,
      ReturnType<typeof listKsiItems>
    > = {
      name: "list_ksi",
      description: "List individual KSI requirement entries (like KSI-IAM-01, KSI-CNA-02) with optional filters. To see all KSI categories and their descriptions, use get_frmr_document with path 'FRMR.KSI.key-security-indicators.json' instead. This tool filters specific requirements within categories.",
      schema,
      execute: async (input) => {
        const result = listKsiItems({
          id: input.id,
          text: input.text,
          category: input.category,
          status: input.status,
          limit: input.limit ?? 100,
          offset: input.offset ?? 0,
        });
        return result;
      },
    };
  • Registration of the listKsiTool (among other tools) in the MCP server via 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,
      ]);
    }
  • Supporting types (ListKsiOptions), helper function (textMatches), and core listKsiItems implementation that performs filtering and pagination on KSI items fetched from getKsiItems().
    export interface ListKsiOptions {
      id?: string;
      text?: string;
      category?: string;
      status?: string;
      limit: number;
      offset: number;
    }
    
    function textMatches(haystack: string | undefined, needle: string): boolean {
      if (!haystack) {
        return false;
      }
      return haystack.toLowerCase().includes(needle.toLowerCase());
    }
    
    export function listKsiItems(
      options: ListKsiOptions,
    ): { total: number; items: KsiItem[] } {
      const all = getKsiItems();
      const filtered = all.filter((item) => {
        if (options.id && item.id !== options.id) {
          return false;
        }
        if (
          options.text &&
          !(
            textMatches(item.title, options.text) ||
            textMatches(item.description, options.text)
          )
        ) {
          return false;
        }
        if (
          options.category &&
          !textMatches(item.category, options.category)
        ) {
          return false;
        }
        if (
          options.status &&
          options.status !== item.status
        ) {
          return false;
        }
        return true;
      });
      const total = filtered.length;
      const items = filtered.slice(options.offset, options.offset + options.limit);
      return { total, items };
    }

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