Skip to main content
Glama

Search for UTCP Tools

search_tools

Find relevant tools by describing your task. Returns up to 10 matches based on natural language input.

Instructions

Searches for relevant tools based on a task description.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_descriptionYesA natural language description of the task.
limitNo

Implementation Reference

  • Handler function for 'search_tools' tool. Registers tool via MCP SDK, accepts 'task_description' (string) and 'limit' (number, optional default 10), calls client.searchTools(), returns simplified tool list.
    mcp.registerTool("search_tools", {
        title: "Search for UTCP Tools",
        description: "Searches for relevant tools based on a task description.",
        inputSchema: {
            task_description: z.string().describe("A natural language description of the task."),
            limit: z.number().optional().default(10),
        },
    }, async (input) => {
        const client = await initializeUtcpClient();
        try {
            const tools = await client.searchTools(input.task_description, input.limit);
            const simplified = tools.map(t => ({ name: t.name, description: t.description, input_schema: t.inputs }));
            return { content: [{ type: "text", text: JSON.stringify({ tools: simplified }) }] };
        } catch (e: any) {
            return { content: [{ type: "text", text: JSON.stringify({ success: false, error: e.message }) }] };
        }
    });
  • Handler function for 'search_tools' tool in standalone TypeScript bridge. Same logic as index.ts: registers tool, calls client.searchTools(), returns simplified tool data.
    mcp.registerTool("search_tools", {
        title: "Search for UTCP Tools",
        description: "Searches for relevant tools based on a task description.",
        inputSchema: {
            task_description: z.string().describe("A natural language description of the task."),
            limit: z.number().optional().default(10),
        },
    }, async (input) => {
        const client = await initializeUtcpClient();
        try {
            const tools = await client.searchTools(input.task_description, input.limit);
            const simplified = tools.map(t => ({ name: t.name, description: t.description, input_schema: t.inputs }));
            return { content: [{ type: "text", text: JSON.stringify({ tools: simplified }) }] };
        } catch (e: any) {
            return { content: [{ type: "text", text: JSON.stringify({ success: false, error: e.message }) }] };
        }
    });
  • Handler function for 'search_tools' tool in Python FastMCP bridge. Accepts 'query' (str) and 'limit' (int, default 10), calls self.client.search_tools(), returns list of tool dicts.
    @self.mcp.tool(name="search_tools", description="Search for tools. Args: query (str), limit (int, optional)")
    async def search_tools(query: str, limit: int = 10) -> List[Dict[str, Any]]:
        tools = self.client.search_tools(query, limit)
        return [tool.model_dump() for tool in tools]
  • Handler function for 'search_tools' tool in standalone Python FastMCP bridge. Accepts 'task_description' (str) and 'limit' (int, default 10), calls client.search_tools(), returns dict with tools list.
    @mcp.tool()
    async def search_tools(task_description: str, limit: int = 10) -> Dict[str, Any]:
        """Search for tools using a query string.
        
        Args:
            task_description: Description of the task to search for tools
            limit: Optional limit on the number of tools to return
            
        Returns:
            Dictionary with success status and matching tools
        """
        client = await initialize_utcp_client()
        
        try:
            tools = await client.search_tools(task_description, limit)
            return {"tools": [{"name": tool.name, "description": tool.description, "input_schema": tool.inputs.model_dump(exclude_none=True)} for tool in tools]}
        except Exception as e:
            return {"error": str(e)}
  • index.ts:129-145 (registration)
    Registration of 'search_tools' via mcp.registerTool() with Zod schema for task_description and limit.
    mcp.registerTool("search_tools", {
        title: "Search for UTCP Tools",
        description: "Searches for relevant tools based on a task description.",
        inputSchema: {
            task_description: z.string().describe("A natural language description of the task."),
            limit: z.number().optional().default(10),
        },
    }, async (input) => {
        const client = await initializeUtcpClient();
        try {
            const tools = await client.searchTools(input.task_description, input.limit);
            const simplified = tools.map(t => ({ name: t.name, description: t.description, input_schema: t.inputs }));
            return { content: [{ type: "text", text: JSON.stringify({ tools: simplified }) }] };
        } catch (e: any) {
            return { content: [{ type: "text", text: JSON.stringify({ success: false, error: e.message }) }] };
        }
    });
Behavior2/5

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

With no annotations, the description does not disclose how the search works (e.g., semantic vs keyword), what results are returned, or any potential side effects. The short description omits important behavioral details.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, making it concise. However, it sacrifices completeness for brevity and could include more useful information without becoming verbose.

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?

The description does not specify the return format or structure, which is problematic since no output schema exists. It is minimally adequate for a simple tool but lacks completeness.

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

Parameters2/5

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

The input schema covers 50% of parameters with descriptions, but the tool description adds no extra meaning. The 'limit' parameter lacks explanation, and 'task_description' format is not elaborated.

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 tool searches for tools based on a task description, which differentiates it from siblings like list_tools and call_tool.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives such as list_tools or tool_info. The description lacks context for 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/universal-tool-calling-protocol/utcp-mcp'

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