Skip to main content
Glama
lars-hagen

Slack User MCP Server

by lars-hagen

slack_get_user_profile

Retrieve detailed profile information for a specific Slack user by providing their user ID to access contact details and workspace data.

Instructions

Get detailed profile information for a specific user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
user_idYesThe ID of the user

Implementation Reference

  • Executes the slack_get_user_profile tool by validating the user_id argument and calling the SlackClient's getUserProfile method.
    case "slack_get_user_profile": {
      const args = request.params
        .arguments as unknown as GetUserProfileArgs;
      if (!args.user_id) {
        throw new Error("Missing required argument: user_id");
      }
      const response = await slackClient.getUserProfile(args.user_id);
      return {
        content: [{ type: "text", text: JSON.stringify(response) }],
      };
    }
  • Defines the Tool object for slack_get_user_profile, including name, description, and input schema requiring user_id.
    const getUserProfileTool: Tool = {
      name: "slack_get_user_profile",
      description: "Get detailed profile information for a specific user",
      inputSchema: {
        type: "object",
        properties: {
          user_id: {
            type: "string",
            description: "The ID of the user",
          },
        },
        required: ["user_id"],
      },
    };
  • SlackClient helper method that makes an API call to retrieve the detailed profile of a specific user by ID.
    async getUserProfile(user_id: string): Promise<any> {
      const params = new URLSearchParams({
        user: user_id,
        include_labels: "true",
      });
    
      const response = await fetch(
        `https://slack.com/api/users.profile.get?${params}`,
        { headers: this.headers },
      );
    
      return response.json();
    }
  • index.ts:532-546 (registration)
    Registers the slack_get_user_profile tool (via getUserProfileTool) in the list of available tools returned by ListToolsRequest handler.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      console.error("Received ListToolsRequest");
      return {
        tools: [
          listChannelsTool,
          postMessageTool,
          replyToThreadTool,
          addReactionTool,
          getChannelHistoryTool,
          getThreadRepliesTool,
          getUsersTool,
          getUserProfileTool,
        ],
      };
    });
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 states this is a 'Get' operation, implying read-only behavior, but doesn't specify authentication requirements, rate limits, error conditions, or what 'detailed profile information' includes (e.g., fields like email, status, timezone). This leaves significant gaps for a tool with no annotation coverage.

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, clear sentence with zero wasted words. It front-loads the core purpose ('Get detailed profile information') efficiently, making it easy to parse and understand 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 lack of annotations and output schema, the description is incomplete. It doesn't explain what 'detailed profile information' entails (e.g., response structure), authentication needs, or error handling. For a tool with no structured data beyond the input schema, this leaves the agent under-informed about behavioral aspects.

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 'user_id' documented as 'The ID of the user'. The description adds no additional parameter semantics beyond what the schema provides, such as format examples or where to find user IDs. 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 verb ('Get') and resource ('detailed profile information for a specific user'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'slack_get_users', which might retrieve multiple users versus this single-user focus.

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 choose this over 'slack_get_users' for single-user details or other sibling tools, leaving the agent to infer usage from context 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/lars-hagen/slack-user-mcp'

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