Skip to main content
Glama
yvanfreitas

MCP Test Server

by yvanfreitas

search

Find users and tasks in the MCP Test Server by entering search queries to locate specific data entries.

Instructions

Search users and tasks

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query

Implementation Reference

  • Implements the core logic of the 'search' tool by querying both UserService and TaskService and aggregating results.
    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
      };
    }
  • Defines the input schema, name, and description 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:38-46 (registration)
    Registers the 'search' tool for listing by including its schema in the tools response.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: [
          ...userToolSchemas,
          ...taskToolSchemas,
          searchToolSchema
        ]
      };
    });
  • mcp-server.js:64-65 (registration)
    Dispatches calls to the 'search' tool by invoking SearchService.search in the callToolRequestSchema handler.
    case 'search':
      return createMcpResponse(SearchService.search(args.query));
Behavior2/5

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

No annotations are provided, so the description carries the full burden. 'Search users and tasks' implies a read operation but doesn't disclose behavioral traits like whether it's paginated, what fields are searchable, if it requires authentication, or how results are returned. For a search tool with zero annotation coverage, this is a significant gap in transparency.

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

Conciseness4/5

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

The description is extremely concise with just three words, which is efficient and front-loaded. However, it may be overly terse given the lack of other context, bordering on under-specification rather than optimal conciseness. It earns a 4 for zero waste but could benefit from slightly more detail.

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

Completeness2/5

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

Given the complexity of a search operation, no annotations, and no output schema, the description is incomplete. It doesn't explain what the tool returns, how results are structured, or any behavioral nuances. For a tool that likely returns complex data, this minimal description leaves significant gaps for the agent to infer.

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%, with the single parameter 'query' documented in the schema. The description doesn't add any meaning beyond what the schema provides, such as explaining query syntax, examples, or limitations. With high schema coverage, the baseline score of 3 is appropriate as the description doesn't compensate but also doesn't detract.

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

Purpose3/5

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

The description 'Search users and tasks' states the general purpose but lacks specificity. It mentions the resources (users and tasks) but doesn't specify the verb beyond 'search' or differentiate from sibling tools like get_users or get_tasks. The purpose is clear but vague about what kind of search operation this performs.

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?

The description provides no guidance on when to use this tool versus alternatives like get_users, get_tasks, or other search-related tools. It doesn't mention prerequisites, context for usage, or any exclusions. The agent must infer usage from the name alone.

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

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