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
| Name | Required | Description | Default |
|---|---|---|---|
| user | Yes | User ID (e.g., U1234567890) |
Implementation Reference
- src/tools/users.ts:24-36 (handler)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, }; }); }
- src/utils/validators.ts:37-39 (schema)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),