Skip to main content
Glama
yvanfreitas

MCP Test Server

by yvanfreitas

search

Search for users and tasks on the MCP Test Server by entering a query to retrieve relevant data efficiently. Supports streamlined user and task management.

Instructions

Search users and tasks

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query

Implementation Reference

  • The core handler function that performs the search by aggregating results from UserService.search and TaskService.search.
    static search(query) { if (!query) { return { success: false, message: 'Query parameter is required' }; } const userResults = UserService.search(query); const taskResults = TaskService.search(query); return { success: true, query, results: { users: userResults, tasks: taskResults }, totalResults: userResults.length + taskResults.length }; }
  • The input schema definition for the MCP 'search' tool.
    export const searchToolSchema = { name: 'search', description: 'Search users and tasks', inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'Search query' } }, required: ['query'] } };
  • mcp-server.js:40-44 (registration)
    Registration of the search tool schema in the ListTools response.
    tools: [ ...userToolSchemas, ...taskToolSchemas, searchToolSchema ]
  • mcp-server.js:64-65 (registration)
    Handler registration for the 'search' tool in the CallToolRequestSchema switch dispatcher.
    case 'search': return createMcpResponse(SearchService.search(args.query));

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/yvanfreitas/MCP-test'

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