Skip to main content
Glama
huseyindol

User Info MCP Server

by huseyindol

Kullanıcı Ara

search_users_by_email

Find user information by searching with an email address. This tool helps locate specific user data in the User Info MCP Server system.

Instructions

E-posta adresine göre kullanıcı ara

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
emailYesAranacak kullanıcı e-posta adresi

Implementation Reference

  • The handler function that executes the tool logic: receives email input, calls userService.searchUsersByEmail, formats result into MCP ToolResponse with JSON stringified output.
    static async handleSearchUsersByEmail({ email }: { email: string }): Promise<ToolResponse> {
      try {
        const result = await userService.searchUsersByEmail(email);
        
        return {
          content: [
            {
              type: "text",
              text: result.success && result.data
                ? JSON.stringify(result.data, null, 2)
                : result.message || result.error || "Kullanıcı bulunamadı",
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: "text",
              text: "Kullanıcı arama işleminde hata oluştu",
            },
          ],
        };
      }
    }
  • Zod schema defining the input for the tool: requires a valid email string.
    export const SearchUsersByEmailInputSchema = {
      email: z.string().email().describe("Aranacak kullanıcı e-posta adresi")
    };
  • Registration of the MCP tool 'search_users_by_email' with title, description, input schema, and reference to the handler function.
    server.registerTool(
      "search_users_by_email",
      {
        title: "Kullanıcı Ara",
        description: "E-posta adresine göre kullanıcı ara",
        inputSchema: SearchUsersByEmailInputSchema,
      },
      UserController.handleSearchUsersByEmail
    );
  • Supporting service method implementing business logic: validates email format, queries repository by email, returns structured ServiceResult.
    async searchUsersByEmail(email: string): Promise<ServiceResult<User | null>> {
      try {
        // Business rule: Email must be a valid email address
        if (!email.includes('@')) {
          return {
            success: false,
            error: "E-posta adresi geçersiz",
            data: null
          };
        }
    
        const user = await userRepository.findByEmail(email);
        
        return {
          success: true,
          data: user,
          message: user ? `"${email}" için kullanıcı bulundu` : `"${email}" e-posta adresiyle kullanıcı bulunamadı`
        };
      } catch (error) {
        return {
          success: false,
          error: "Kullanıcı arama işleminde hata oluştu",
          data: null
        };
      }
    }
Behavior2/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. It only states the search action without mentioning whether this is a read-only operation, what permissions might be required, what happens with multiple matches, or the format of results. For a search tool with zero annotation coverage, this is insufficient.

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 any unnecessary words. It's appropriately sized and front-loaded with the core purpose.

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 lack of annotations and output schema, the description is incomplete. It doesn't address behavioral aspects like search behavior (exact match vs partial), result format, or error handling, which are important for a search tool with no structured metadata.

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 input schema has 100% description coverage, with the email parameter clearly documented. The description adds no additional parameter information beyond what the schema provides, so it meets the baseline of 3 where the schema does the heavy lifting.

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 as searching users by email address ('E-posta adresine göre kullanıcı ara'), which is a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like search_users_by_name or search_users_by_phone, though the email focus is implied.

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 sibling tools like search_users_by_name or get_user_by_id, nor does it specify scenarios where email-based search is preferred over other methods.

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/huseyindol/McpProjectScaffold'

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