Skip to main content
Glama
hackIDLE

FedRAMP Docs MCP Server

by hackIDLE

get_requirement_by_id

Retrieve FedRAMP security requirements by ID, including KSI indicators, FRR requirements, and FRD definitions, to support compliance analysis and documentation review.

Instructions

Get any FedRAMP requirement by its ID. Works with KSI indicators (KSI-), FRR requirements (FRR-), and FRD definitions (FRD-*).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesRequirement ID (e.g., KSI-IAM-01, FRR-MAS-01, FRR-VDR-01)

Implementation Reference

  • The main execute function implementing the tool logic: normalizes ID to uppercase, checks KSI items if prefix matches, otherwise recursively searches all FRMR documents for matching ID, returns structured result or throws NOT_FOUND error.
    execute: async (input) => {
      const searchId = input.id.toUpperCase();
    
      // First check KSI items (most common)
      if (searchId.startsWith("KSI-")) {
        const ksiItems = getKsiItems();
        const ksiItem = ksiItems.find(
          (item) => item.id.toUpperCase() === searchId,
        );
        if (ksiItem) {
          return {
            id: ksiItem.id,
            source: "KSI",
            documentPath: ksiItem.docPath,
            documentTitle: "Key Security Indicators",
            title: ksiItem.title,
            statement: ksiItem.statement,
            description: ksiItem.description,
            theme: ksiItem.category,
            impact: ksiItem.impact,
            controlMapping: ksiItem.controlMapping,
            evidenceExamples: ksiItem.evidenceExamples,
          };
        }
      }
    
      // Search in all FRMR documents
      const docs = getFrmrDocuments();
      for (const doc of docs) {
        if (!doc.raw || typeof doc.raw !== "object") continue;
    
        // Recursive search for item with matching ID
        const found = findItemById(doc.raw, searchId);
        if (found) {
          return {
            id: searchId,
            source: doc.type,
            documentPath: doc.path,
            documentTitle: doc.title,
            title: (found as Record<string, unknown>).name as string | undefined,
            statement: (found as Record<string, unknown>).statement as
              | string
              | undefined,
            description: (found as Record<string, unknown>).description as
              | string
              | undefined,
            raw: found,
          };
        }
      }
    
      throw createError({
        code: "NOT_FOUND",
        message: `Requirement not found for ID: ${input.id}`,
        hint: "Try using list_frmr_documents to see available documents, or list_ksi to browse KSI items.",
      });
    },
  • Zod input schema defining the 'id' parameter as a string with description of expected formats (KSI-*, FRR-*, FRD-*).
    const schema = z.object({
      id: z
        .string()
        .describe(
          "Requirement ID (e.g., KSI-IAM-01, FRR-MAS-01, FRR-VDR-01)",
        ),
    });
  • The registerTools function that registers getRequirementByIdTool (imported at line 10) 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,
      ]);
    }
  • Recursive helper function to search for an item with matching ID in nested objects or arrays, used in FRMR document search.
    function findItemById(obj: unknown, targetId: string): unknown | null {
      if (!obj || typeof obj !== "object") return null;
    
      if (Array.isArray(obj)) {
        for (const item of obj) {
          if (
            item &&
            typeof item === "object" &&
            "id" in item &&
            String((item as Record<string, unknown>).id).toUpperCase() === targetId
          ) {
            return item;
          }
          const found = findItemById(item, targetId);
          if (found) return found;
        }
      } else {
        const record = obj as Record<string, unknown>;
        if ("id" in record && String(record.id).toUpperCase() === targetId) {
          return record;
        }
        for (const value of Object.values(record)) {
          const found = findItemById(value, targetId);
          if (found) return found;
        }
      }
      return null;
    }
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses the tool's scope (works with three ID types) but doesn't mention behavioral traits like error handling for invalid IDs, response format, or whether it's a read-only operation (implied by 'Get' but not explicit). It adds some context but lacks details on permissions, rate limits, or output structure.

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 two sentences, front-loaded with the core purpose and followed by specific details on ID formats. Every word earns its place with no redundancy or fluff, making it highly efficient and easy to parse.

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 low complexity (single parameter, no annotations, no output schema), the description is adequate but has gaps. It covers what the tool does and valid inputs, but without annotations or output schema, it should ideally mention that it's a read operation and hint at the return format (e.g., requirement details). It's minimally viable but could be more complete.

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

Parameters4/5

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

Schema description coverage is 100%, so the schema already documents the single 'id' parameter with examples. The description adds value by specifying the semantic meaning of valid ID formats (KSI-*, FRR-*, FRD-*), which clarifies beyond the schema's generic examples. With 0 parameters beyond the single documented one, this exceeds the baseline of 3.

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

Purpose5/5

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

The description clearly states the verb 'Get' and the resource 'FedRAMP requirement by its ID', specifying it works with three distinct ID types (KSI indicators, FRR requirements, FRD definitions). This distinguishes it from siblings like get_ksi (which likely returns KSI data generally) or get_control_requirements (which might return requirements for controls).

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool: when you have a specific requirement ID from one of the three supported formats. It doesn't explicitly state when NOT to use it or name alternatives, but the specificity of ID-based retrieval implies it's not for listing or searching without IDs.

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

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