Skip to main content
Glama
ubie-oss

Slack MCP Server

by ubie-oss

slack_get_users

Retrieve workspace user profiles to manage team information and access permissions through Slack API integration.

Instructions

Retrieve basic profile information of all users in the workspace

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cursorNoPagination cursor for next page of results
limitNoMaximum number of users to return (default 100)

Implementation Reference

  • Handler for slack_get_users tool: parses arguments, calls slackClient.users.list with limit and cursor, validates response with GetUsersResponseSchema, and returns JSON string of parsed users list.
    case 'slack_get_users': { const args = GetUsersRequestSchema.parse(request.params.arguments); const response = await slackClient.users.list({ limit: args.limit, cursor: args.cursor, }); if (!response.ok) { throw new Error(`Failed to get users: ${response.error}`); } const parsed = GetUsersResponseSchema.parse(response); return { content: [{ type: 'text', text: JSON.stringify(parsed) }], }; }
  • src/index.ts:147-152 (registration)
    Tool registration in ListToolsRequestSchema handler, defining name, description, and input schema for slack_get_users.
    { name: 'slack_get_users', description: 'Retrieve basic profile information of all users in the workspace', inputSchema: zodToJsonSchema(GetUsersRequestSchema), },
  • Input schema (GetUsersRequestSchema) for slack_get_users tool: optional cursor and limit parameters.
    export const GetUsersRequestSchema = z.object({ cursor: z .string() .optional() .describe('Pagination cursor for next page of results'), limit: z .number() .int() .min(1) .optional() .default(100) .describe('Maximum number of users to return (default 100)'), });
  • Output schema (GetUsersResponseSchema) for slack_get_users: extends BaseResponseSchema with array of MemberSchema.
    export const GetUsersResponseSchema = BaseResponseSchema.extend({ members: z.array(MemberSchema).optional(), });
  • MemberSchema used in GetUsersResponseSchema: defines basic user fields id, name, real_name.
    const MemberSchema = z .object({ id: z.string().optional(), name: z.string().optional(), real_name: z.string().optional(), }) .strip();

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/ubie-oss/slack-mcp-server'

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