Skip to main content
Glama
yusuferenkt

MCP JSON Database Server

by yusuferenkt

search_users

Find users by name, email, department, or position in the JSON database server to manage user information and access.

Instructions

Kullanıcıları ad, email, departman veya pozisyona göre arar

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesArama terimi

Implementation Reference

  • Handler for the 'search_users' tool. Extracts query from arguments, calls searchUsers helper on database users, strips passwords from results, and returns JSON-formatted list.
    case 'search_users': {
      const { query } = args;
      const results = searchUsers(db.users, query);
      const resultsWithoutPasswords = results.map(user => {
        const { password, ...userWithoutPassword } = user;
        return userWithoutPassword;
      });
      
      return {
        content: [{
          type: 'text',
          text: JSON.stringify(resultsWithoutPasswords, null, 2)
        }]
      };
    }
  • src/index.js:244-254 (registration)
    Registration of the 'search_users' tool in the ListToolsRequestSchema handler, including name, description, and inputSchema.
    {
      name: 'search_users',
      description: 'Kullanıcıları ad, email, departman veya pozisyona göre arar',
      inputSchema: {
        type: 'object',
        properties: {
          query: { type: 'string', description: 'Arama terimi' }
        },
        required: ['query']
      }
    },
  • Input schema for 'search_users' tool: requires a 'query' string parameter.
    inputSchema: {
      type: 'object',
      properties: {
        query: { type: 'string', description: 'Arama terimi' }
      },
      required: ['query']
  • Helper function searchUsers that filters users array by lowercase query matching name, email, department, or position.
    export function searchUsers(users, query) {
        const searchTerm = query.toLowerCase();
        return users.filter(user => 
            user.name.toLowerCase().includes(searchTerm) ||
            user.email.toLowerCase().includes(searchTerm) ||
            user.department.toLowerCase().includes(searchTerm) ||
            user.position.toLowerCase().includes(searchTerm)
        );
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It only states what the tool does (searching) but doesn't describe how it behaves: whether it's read-only, what permissions are needed, if it returns partial matches, pagination details, or error conditions. 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.

Conciseness5/5

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

The description is a single, efficient sentence that directly states the tool's function without unnecessary words. It's appropriately sized and front-loaded with the core purpose, making it easy for an agent to parse quickly.

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, lack of annotations, and no output schema, the description is incomplete. It doesn't explain what the search returns (e.g., list of users, partial matches), any limitations (e.g., case sensitivity, wildcards), or error handling. For a tool with no structured behavioral data, the description should provide more operational context.

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?

The schema description coverage is 100%, with the single parameter 'query' documented as 'Arama terimi' (search term). The description adds marginal value by specifying what fields the search covers (name, email, department, position), but doesn't provide additional syntax, format, or matching rules beyond what the schema implies. This meets the baseline for high schema coverage.

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

Purpose4/5

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

The description clearly states the tool's purpose: searching users by specific attributes (name, email, department, or position). It uses a specific verb ('arar' - search) and identifies the resource ('kullanıcıları' - users). However, it doesn't explicitly differentiate from sibling tools like 'list_users' or 'get_user_by_id', which prevents a perfect score.

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. It doesn't mention when to prefer 'search_users' over 'list_users' (for filtered searches) or 'get_user_by_id' (for direct ID lookup), nor does it specify any prerequisites or exclusions. This leaves the agent without contextual usage instructions.

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/yusuferenkt/mcp-database'

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