Skip to main content
Glama
mcp360

MCP360 Universal Gateway

Official
by mcp360

search

Search across 100+ MCP tools and custom integrations through a unified gateway to find specific tools by name or keywords.

Instructions

search tool

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNoThe query to search the tools by name or keywords
limitNoThe limit of results to return

Implementation Reference

  • Handler function that executes the 'search' tool logic: calls client.searchTools, formats the results into a numbered list with parameters, handles empty results and errors.
    handler: async (args: any, client: GatewayClient) => {
      try {
        const tools = await client.searchTools(args.query || '');
    
        if (tools.length === 0) {
          return {
            content: [{
              type: 'text' as const,
              text: args.query
                ? `No tools found matching "${args.query}".`
                : 'No tools available.',
            }],
          };
        }
    
        // Format tools list
        const toolsList = tools.map((tool, index) => {
          const params = tool.inputSchema.properties
            ? Object.keys(tool.inputSchema.properties)
              .map(key => {
                const prop = tool.inputSchema.properties![key];
                const required = tool.inputSchema.required?.includes(key) ? ' (required)' : '';
                return `    - ${key}${required}: ${prop.description || prop.type}`;
              })
              .join('\n')
            : '    No parameters';
    
          return `${index + 1}. **${tool.name}**\n   ${tool.description}\n   Parameters:\n${params}`;
        }).join('\n\n');
    
        const summary = args.query
          ? `Found ${tools.length} tool(s) matching "${args.query}":`
          : `Available tools (${tools.length}):`;
    
        return {
          content: [{
            type: 'text' as const,
            text: `${summary}\n\n${toolsList}`,
          }],
        };
      } catch (error) {
        return {
          content: [{
            type: 'text' as const,
            text: `Error searching tools: ${error instanceof Error ? error.message : 'Unknown error'}`,
          }],
          isError: true,
        };
      }
    },
  • Input schema for the 'search' tool using Zod: optional 'query' string.
    inputSchema: z.object({
      query: z.string().optional().describe('Search term to filter tools by name or description. Leave empty to list all available tools.'),
    }),
  • Full tool definition including name 'search', description, inputSchema, and handler.
    export const searchTool = {
      name: 'search',
      description: 'Search and discover available tools across all connected MCP servers. Returns a list of tools matching your search query.',
      inputSchema: z.object({
        query: z.string().optional().describe('Search term to filter tools by name or description. Leave empty to list all available tools.'),
      }),
      handler: async (args: any, client: GatewayClient) => {
        try {
          const tools = await client.searchTools(args.query || '');
    
          if (tools.length === 0) {
            return {
              content: [{
                type: 'text' as const,
                text: args.query
                  ? `No tools found matching "${args.query}".`
                  : 'No tools available.',
              }],
            };
          }
    
          // Format tools list
          const toolsList = tools.map((tool, index) => {
            const params = tool.inputSchema.properties
              ? Object.keys(tool.inputSchema.properties)
                .map(key => {
                  const prop = tool.inputSchema.properties![key];
                  const required = tool.inputSchema.required?.includes(key) ? ' (required)' : '';
                  return `    - ${key}${required}: ${prop.description || prop.type}`;
                })
                .join('\n')
              : '    No parameters';
    
            return `${index + 1}. **${tool.name}**\n   ${tool.description}\n   Parameters:\n${params}`;
          }).join('\n\n');
    
          const summary = args.query
            ? `Found ${tools.length} tool(s) matching "${args.query}":`
            : `Available tools (${tools.length}):`;
    
          return {
            content: [{
              type: 'text' as const,
              text: `${summary}\n\n${toolsList}`,
            }],
          };
        } catch (error) {
          return {
            content: [{
              type: 'text' as const,
              text: `Error searching tools: ${error instanceof Error ? error.message : 'Unknown error'}`,
            }],
            isError: true,
          };
        }
      },
    };
Behavior1/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. 'search tool' reveals nothing about whether this is read-only or destructive, what permissions are needed, how results are returned, pagination behavior, rate limits, or error conditions. It's completely inadequate for a tool with parameters.

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

Conciseness2/5

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

While technically concise with just two words, this is under-specification rather than effective conciseness. The description fails to communicate essential information and doesn't front-load critical details. Every sentence should earn its place, but here the single phrase doesn't earn its place by being informative.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has parameters and no output schema, the description is completely inadequate. It doesn't explain what the tool searches, how results are structured, what happens when no results are found, or any behavioral context. With no annotations and minimal description, this leaves the agent with insufficient information to use the tool effectively.

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 both parameters (query and limit). The description adds zero additional parameter information beyond what's in the schema. According to scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no param info in description.

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

Purpose2/5

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

The description 'search tool' is a tautology that merely restates the tool name without specifying what resource is being searched. It doesn't distinguish this search tool from the sibling 'execute' tool, nor does it clarify what domain or context the search operates in (tools, documents, data, etc.).

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

Usage Guidelines1/5

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

The description provides no guidance on when to use this tool versus alternatives. There's no mention of the sibling 'execute' tool or any context about appropriate use cases, prerequisites, or limitations. The agent receives zero direction on tool selection.

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/mcp360/unified-gateway-mcp'

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