Skip to main content
Glama
ubie-oss

Slack MCP Server

by ubie-oss

slack_get_users

Retrieve basic profile information of all users in a Slack workspace, with pagination support using cursor and limit parameters.

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

  • The handler that executes the slack_get_users tool. It parses the request via GetUsersRequestSchema, calls slackClient.users.list() with pagination (limit/cursor), validates the response with GetUsersResponseSchema, and returns the user list as JSON.
    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) }],
      };
    }
  • Input schema (GetUsersRequestSchema) for slack_get_users: accepts optional cursor (string) and limit (number, default 100).
    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/response schema (GetUsersResponseSchema) for slack_get_users: extends BaseResponseSchema with an optional array of members (MemberSchema with id, name, real_name).
    export const GetUsersResponseSchema = BaseResponseSchema.extend({
      members: z.array(MemberSchema).optional(),
    });
  • src/index.ts:147-177 (registration)
    Registration of slack_get_users as a tool in the ListToolsRequestSchema handler, with description and input schema reference.
        {
          name: 'slack_get_users',
          description:
            'Retrieve basic profile information of all users in the workspace',
          inputSchema: zodToJsonSchema(GetUsersRequestSchema),
        },
        {
          name: 'slack_get_user_profiles',
          description: 'Get multiple users profile information in bulk',
          inputSchema: zodToJsonSchema(GetUserProfilesRequestSchema),
        },
        {
          name: 'slack_search_messages',
          description:
            'Search for messages with specific criteria/filters. Use this when: 1) You need to find messages from a specific user, 2) You need messages from a specific date range, 3) You need to search by keywords, 4) You want to filter by channel. This tool is optimized for targeted searches. For general channel browsing without filters, use slack_get_channel_history instead.',
          inputSchema: zodToJsonSchema(SearchMessagesRequestSchema),
        },
        {
          name: 'slack_search_channels',
          description:
            'Search for channels by partial name match. Use this when you need to find channels containing specific keywords in their names. Returns up to the specified limit of matching channels.',
          inputSchema: zodToJsonSchema(SearchChannelsRequestSchema),
        },
        {
          name: 'slack_search_users',
          description:
            'Search for users by partial name match across username, display name, and real name. Use this when you need to find users containing specific keywords in their names. Returns up to the specified limit of matching users.',
          inputSchema: zodToJsonSchema(SearchUsersRequestSchema),
        },
      ],
    };
  • Example client code demonstrating how to call the slack_get_users tool via stdio transport.
    // Call slack_get_users
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden but only says 'retrieve basic profile information.' It does not disclose pagination (though schema has cursor/limit), rate limits, or that it may return a large dataset. Schema provides some context, so minimum viable.

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?

Single sentence that efficiently conveys the tool's purpose. No unnecessary words or repetition. Front-loaded with the key action and resource.

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?

No output schema and no description of return format. The description says 'basic profile information' but does not specify fields or structure. For a tool that returns potentially many users, this is insufficient for an agent to understand the response.

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 covers both parameters (cursor and limit) with descriptions. The description adds no additional meaning beyond what schema provides. Since schema description coverage is 100%, baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Retrieve'), the resource ('basic profile information of all users'), and the scope ('all users in the workspace'). The name 'get_users' distinguishes it from siblings like 'search_users' and 'get_user_profiles', implying a bulk retrieval.

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?

No guidance on when to use this tool versus the alternative 'slack_search_users' or 'slack_get_user_profiles'. There is no mention of prerequisites, performance considerations, or context that would help an agent decide.

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

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