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, }; } }, };

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

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