Skip to main content
Glama

get_user_info

Retrieve detailed user information from Slack workspaces by providing a user ID to access profile data and workspace details.

Instructions

Get detailed information about a specific user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userYesUser ID (e.g., U1234567890)

Implementation Reference

  • The main handler function that executes the get_user_info tool logic: parses args with schema, calls Slack users.info API, returns user info.
    export async function getUserInfo(client: SlackClientWrapper, args: unknown) {
      const params = getUserInfoSchema.parse(args);
    
      return await client.safeCall(async () => {
        const result = await client.getClient().users.info({
          user: params.user,
        });
    
        return {
          user: result.user,
        };
      });
    }
  • Zod input validation schema for get_user_info tool requiring a valid user ID.
    export const getUserInfoSchema = z.object({
      user: userIdSchema,
    });
  • src/index.ts:137-150 (registration)
    Tool definition registered in the tools list for list_tools handler, including MCP input schema.
    {
      name: 'get_user_info',
      description: 'Get detailed information about a specific user',
      inputSchema: {
        type: 'object',
        properties: {
          user: {
            type: 'string',
            description: 'User ID (e.g., U1234567890)',
          },
        },
        required: ['user'],
      },
    },
  • src/index.ts:422-422 (registration)
    Handler mapping in toolHandlers object that connects 'get_user_info' tool calls to the userTools.getUserInfo implementation.
    get_user_info: (args) => userTools.getUserInfo(slackClient, args),

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

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