Skip to main content
Glama

capacities_search

Search content across Capacities knowledge spaces with optional filtering by space, structure, or search mode to find specific information.

Instructions

Search for content across Capacities spaces with optional filtering

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
searchTermYesThe search term to look for
spaceIdsYesArray of space UUIDs to search in
modeNoSearch mode: fullText or title onlytitle
filterStructureIdsNoOptional array of structure IDs to filter results

Implementation Reference

  • The async execute function implementing the core logic of the 'capacities_search' tool. It constructs a request body from input args and makes a POST request to the /search API endpoint using makeApiRequest, then returns formatted JSON response.
    execute: async (args: { searchTerm: string; spaceIds: string[]; mode?: "fullText" | "title"; filterStructureIds?: string[]; }) => { try { const requestBody = { searchTerm: args.searchTerm, spaceIds: args.spaceIds, ...(args.mode && { mode: args.mode }), ...(args.filterStructureIds && { filterStructureIds: args.filterStructureIds, }), }; const response = await makeApiRequest("/search", { method: "POST", body: JSON.stringify(requestBody), }); const data = await response.json(); return JSON.stringify(data, null, 2); } catch (error) { throw new Error( `Failed to search content: ${error instanceof Error ? error.message : String(error)}`, ); } },
  • Zod schema defining the input parameters and validation for the 'capacities_search' tool, including searchTerm, spaceIds, optional mode, and filterStructureIds.
    parameters: z.object({ searchTerm: z.string().describe("The search term to look for"), spaceIds: z .array(z.string().uuid()) .describe("Array of space UUIDs to search in"), mode: z .enum(["fullText", "title"]) .optional() .describe("Search mode: fullText or title only") .default("title"), filterStructureIds: z .array(z.string().uuid()) .optional() .describe("Optional array of structure IDs to filter results"), }),
  • src/server.ts:28-28 (registration)
    Registration of the searchTool (named 'capacities_search') by adding it to the FastMCP server instance.
    server.addTool(searchTool);

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/Im-Hal-9K/Capacities-MCP-Plus'

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