Skip to main content
Glama
Im-Hal-9K

Capacities-MCP-Plus

capacities_search

Read-only

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);
Behavior3/5

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

Annotations provide readOnlyHint=true and openWorldHint=true, indicating safe, open-ended operations. The description adds value by specifying 'search for content across Capacities spaces' and 'optional filtering', which clarifies scope beyond annotations. However, it doesn't disclose additional behavioral traits like rate limits, authentication needs, or result formats, leaving some gaps in understanding tool behavior.

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 a single, efficient sentence that front-loads the core action ('search for content') and includes key details ('across Capacities spaces', 'optional filtering') without unnecessary elaboration. Every word earns its place, making it easy for an agent to quickly grasp the tool's function without parsing verbose text.

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 moderate complexity (4 parameters, 2 required) and rich annotations (readOnlyHint, openWorldHint), the description is somewhat complete but lacks output details (no output schema provided). It covers the basic purpose and scope but doesn't address potential limitations, error conditions, or result structures, which could hinder agent effectiveness in complex scenarios.

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

Parameters3/5

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

Schema description coverage is 100%, so parameters are well-documented in the schema. The description adds minimal semantics by mentioning 'optional filtering', which loosely relates to filterStructureIds, but doesn't provide additional meaning beyond what the schema already explains (e.g., searchTerm, spaceIds, mode, filterStructureIds). With high schema coverage, the baseline score of 3 is appropriate as the description doesn't significantly enhance parameter understanding.

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

Purpose4/5

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

The description clearly states the verb 'search' and resource 'content across Capacities spaces', making the purpose understandable. It distinguishes from siblings like capacities_list_spaces (list) and capacities_read_object_content (read specific content) by focusing on search functionality. However, it doesn't explicitly differentiate from potential search alternatives beyond mentioning optional filtering.

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

Usage Guidelines3/5

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

The description implies usage for searching content with filtering, but doesn't provide explicit guidance on when to use this tool versus alternatives. It mentions 'optional filtering' which suggests flexibility, but lacks specific scenarios, prerequisites, or comparisons to sibling tools like capacities_save_to_daily_note for saving content. The context is clear but not detailed enough for optimal agent decision-making.

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

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