Skip to main content
Glama
z9905080

MCP Server for Slack

by z9905080

lookup_user_by_email

Find Slack users by email address to identify team members, retrieve user details, or verify account information within your workspace.

Instructions

Lookup a user by their email address

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
emailYesThe email address of the user

Implementation Reference

  • Core handler function in SlackClient class that fetches user information from Slack API using the provided email address.
    async lookupUserByEmail(email: string): Promise<any> {
    
      const params = new URLSearchParams({
        email: email,
      });
    
      const response = await fetch(`https://slack.com/api/users.lookupByEmail?${params}`, {
        method: "GET",
        headers: this.botHeaders,
      });
    
      return response.json();
    }
  • Tool schema definition specifying name, description, and input schema requiring an 'email' parameter.
    const lookupUserByEmailTool: Tool = {
      name: "lookup_user_by_email",
      description: "Lookup a user by their email address",
      inputSchema: {
        type: "object",
        properties: {
          email: {
            type: "string",
            description: "The email address of the user",
          },
        },
        required: ["email"],
      },
    };
  • index.ts:570-580 (registration)
    Registration of the tool in the list of available tools returned by ListToolsRequest handler.
    tools: [
      listChannelsTool,
      postMessageTool,
      replyToThreadTool,
      addReactionTool,
      getChannelHistoryTool,
      getThreadRepliesTool,
      getUsersTool,
      getUserProfileTool,
      lookupUserByEmailTool,
    ],
  • Dispatch handler in CallToolRequest that extracts email argument and calls the SlackClient lookupUserByEmail method.
    case "lookup_user_by_email": {
      const args = request.params.arguments as { email: string };
      const response = await slackClient.lookupUserByEmail(args.email);
      return {
        content: [{ type: "text", text: JSON.stringify(response) }],
      };
    }
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 of behavioral disclosure. It states the action ('lookup') but doesn't describe what the tool returns (e.g., user details, existence check), error handling (e.g., for invalid emails), permissions required, or rate limits. For a lookup tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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 purpose without unnecessary words. It is front-loaded with the core action and resource, making it easy to understand at a glance. Every part of the sentence earns its place by specifying the lookup method.

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 tool's complexity (a lookup operation with no output schema and no annotations), the description is incomplete. It doesn't explain what the tool returns (e.g., user object, boolean), error scenarios, or how it integrates with sibling tools in the Slack context. For a tool that likely interacts with user data, more context is needed to understand its full scope and limitations.

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 description adds minimal meaning beyond the input schema, which has 100% coverage and clearly documents the single parameter 'email'. The description implies the parameter is used for lookup but doesn't provide additional context like email format requirements or case sensitivity. With high schema coverage, the baseline score of 3 is appropriate as 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 with a specific verb ('lookup') and resource ('user'), and specifies the lookup method ('by their email address'). It distinguishes itself from generic user lookup tools by focusing on email-based identification. However, it doesn't explicitly differentiate from sibling tools like 'slack_get_user_profile' or 'slack_get_users', which might also retrieve user information.

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 (e.g., 'slack_get_users' for listing users or 'slack_get_user_profile' for detailed profiles) or specify contexts like needing email-based identification versus other identifiers. Usage is implied by the name but not explicitly stated.

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/z9905080/mcp-slack'

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