Skip to main content
Glama

search_definitions

Search FedRAMP definitions by term to find official definitions and alternate terms from FRD documents for compliance and security analysis.

Instructions

Search FedRAMP definitions (FRD document) by term. Returns matching definitions with their full text and any alternate terms.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
termYesSearch term to find in definitions
limitNo

Implementation Reference

  • The execute handler implementing the core logic: retrieves FRD document, filters definitions matching the term in term, definition, or alts, and returns paginated results.
    execute: async (input) => { const frdDoc = getFrmrDocuments().find((doc) => doc.type === "FRD"); if (!frdDoc || !frdDoc.raw) { return { total: 0, definitions: [] }; } const raw = frdDoc.raw as Record<string, unknown>; const frd = raw.FRD as Record<string, unknown> | undefined; const allDefs = (frd?.ALL as Definition[]) ?? []; const searchLower = input.term.toLowerCase(); const matches = allDefs.filter((def) => { if (def.term?.toLowerCase().includes(searchLower)) return true; if (def.definition?.toLowerCase().includes(searchLower)) return true; if (def.alts?.some((alt) => alt.toLowerCase().includes(searchLower))) return true; return false; }); return { total: matches.length, definitions: matches.slice(0, input.limit), }; },
  • Input schema using Zod: requires 'term' string, optional 'limit' number (1-100, default 20).
    const schema = z.object({ term: z.string().describe("Search term to find in definitions"), limit: z.number().int().min(1).max(100).default(20), });
  • Registers the searchDefinitionsTool by including it in the array passed to registerToolDefs in registerTools function.
    searchDefinitionsTool,
  • TypeScript interface defining the structure of a definition object used in filtering and output.
    interface Definition { id: string; term: string; definition: string; alts?: string[]; note?: string; }
  • Complete ToolDefinition export including name, description, schema, and execute handler.
    export const searchDefinitionsTool: ToolDefinition< typeof schema, { total: number; definitions: Definition[] } > = { name: "search_definitions", description: "Search FedRAMP definitions (FRD document) by term. Returns matching definitions with their full text and any alternate terms.", schema, execute: async (input) => { const frdDoc = getFrmrDocuments().find((doc) => doc.type === "FRD"); if (!frdDoc || !frdDoc.raw) { return { total: 0, definitions: [] }; } const raw = frdDoc.raw as Record<string, unknown>; const frd = raw.FRD as Record<string, unknown> | undefined; const allDefs = (frd?.ALL as Definition[]) ?? []; const searchLower = input.term.toLowerCase(); const matches = allDefs.filter((def) => { if (def.term?.toLowerCase().includes(searchLower)) return true; if (def.definition?.toLowerCase().includes(searchLower)) return true; if (def.alts?.some((alt) => alt.toLowerCase().includes(searchLower))) return true; return false; }); return { total: matches.length, definitions: matches.slice(0, input.limit), }; }, };

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