Skip to main content
Glama
AVIMBU

Slack MCP Server

by AVIMBU

slack_get_users

Retrieve a list of all workspace users with basic details, supporting pagination for large teams. Use this tool to access user information from Slack workspaces through the MCP server.

Instructions

Get a list of all users in the workspace with basic information

Input Schema

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

Implementation Reference

  • Executes the slack_get_users tool by parsing arguments, calling slackClient.getUsers, and returning the JSON response.
    case "slack_get_users": {
      const args = request.params.arguments as unknown as GetUsersArgs;
      const response = await slackClient.getUsers(args.limit, args.cursor);
      return {
        content: [{ type: "text", text: JSON.stringify(response) }],
      };
    }
  • Defines the TypeScript interface for arguments and the Tool object with name, description, and inputSchema for slack_get_users.
    export interface GetUsersArgs {
      cursor?: string;
      limit?: number;
    }
    
    export const getUsersTool: Tool = {
      name: "slack_get_users",
      description:
        "Get a list of all users in the workspace with basic information",
      inputSchema: {
        type: "object",
        properties: {
          cursor: {
            type: "string",
            description: "Pagination cursor for next page of results",
          },
          limit: {
            type: "number",
            description: "Maximum number of users to return (default 100, max 200)",
            default: 100,
          },
        },
      },
    };
  • src/index.ts:25-29 (registration)
    Registers the slack_get_users tool by including getUsersTool in the list returned by ListToolsRequest handler.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: [getUsersTool, postMessageTool],
      };
    });
  • Implements the Slack API call to users.list endpoint with pagination parameters, used by the tool handler.
    async getUsers(limit: number = 100, cursor?: string): Promise<any> {
      const params = new URLSearchParams({
        limit: Math.min(limit, 200).toString(),
        team_id: SlackClient.TEAM_ID,
      });
    
      if (cursor) {
        params.append("cursor", cursor);
      }
    
      const response = await fetch(`https://slack.com/api/users.list?${params}`, {
        headers: this.botHeaders,
      });
    
      return response.json();
    }
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. While it indicates this is a read operation ('Get'), it doesn't mention important behavioral aspects like authentication requirements, rate limits, error conditions, or what 'basic information' specifically includes. For a tool that presumably accesses workspace data, this leaves significant gaps in understanding how it behaves.

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, efficient sentence that communicates the core purpose without any wasted words. It's appropriately sized for a straightforward list operation and front-loads the essential information. Every word earns its place in this concise formulation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a relatively simple list operation with 2 parameters and no output schema, the description provides adequate but minimal context. It covers what the tool does but lacks important operational details like authentication requirements, rate limits, and what specific user information is returned. Without annotations or output schema, the description should ideally provide more complete guidance about the tool's behavior and results.

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?

The schema description coverage is 100%, with both parameters ('cursor' and 'limit') fully documented in the schema. The description doesn't add any additional parameter semantics beyond what's already in the schema. According to the scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no parameter information in the description.

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 ('list of all users in the workspace'), making the purpose immediately understandable. It specifies 'with basic information' which adds useful context about the scope of returned data. However, it doesn't explicitly differentiate from the sibling tool 'slack_post_message', which is a completely different operation.

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. There's no mention of prerequisites, appropriate contexts, or comparison with the sibling 'slack_post_message' tool. The agent must infer usage purely from the tool name and description without any explicit guidance.

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

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