Skip to main content
Glama

capacities_search

Read-only

Search for specific content within designated spaces on Capacities MCP Server using optional filters for structure and search mode to refine results.

Instructions

Search for content across Capacities spaces with optional filtering

Input Schema

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

Implementation Reference

  • Handler function that executes the capacities_search tool by constructing a request body from parameters and making a POST request to the /search API endpoint, returning the 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 for the capacities_search tool: searchTerm (string), spaceIds (array of UUIDs), optional mode (enum), optional filterStructureIds (array of UUIDs).
    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:26-26 (registration)
    Registration of the searchTool (capacities_search) with the FastMCP server.
    server.addTool(searchTool);
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, indicating a safe, exploratory operation. The description adds minimal behavioral context beyond this, such as mentioning 'optional filtering' but not detailing result formats, pagination, or error handling. It doesn't contradict annotations, so it earns a baseline score for adding some value.

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 with optional filtering'). There is no wasted verbiage, making it highly concise and well-structured.

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, no output schema) and rich annotations, the description is adequate but lacks details on output format or error scenarios. It covers the basic purpose but doesn't fully compensate for the absence of an output schema, leaving gaps in completeness.

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 the schema fully documents all parameters. The description mentions 'optional filtering' but doesn't add specific meaning beyond what the schema provides, such as explaining how filtering interacts with search modes. This aligns with the baseline for high schema coverage.

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 evident. However, it doesn't explicitly differentiate from sibling tools like 'capacities_list_spaces' or 'capacities_save_to_daily_note', which reduces it from a perfect score.

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 through 'optional filtering' but doesn't specify when to use this tool versus alternatives like 'capacities_list_spaces' for listing spaces or 'capacities_save_to_daily_note' for saving content. It provides some context but lacks explicit guidance on exclusions or comparisons.

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

Related 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/jem-computer/capacities-mcp'

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