Skip to main content
Glama
zencoderai

Slack

by zencoderai

slack_get_users

Retrieve a list of all workspace users with their basic profile information for team management and communication purposes.

Instructions

Get a list of all users in the workspace with their basic profile 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

  • Core implementation of fetching Slack users via the users.list API endpoint, with pagination support using limit (max 200) and cursor.
    async getUsers(limit: number = 100, cursor?: string): Promise<any> { const params = new URLSearchParams({ limit: Math.min(limit, 200).toString(), team_id: process.env.SLACK_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(); }
  • Input schema definition for the slack_get_users tool using Zod, including optional pagination parameters.
    { title: "Get Slack Users", description: "Get a list of all users in the workspace with their basic profile information", inputSchema: { cursor: z.string().optional().describe("Pagination cursor for next page of results"), limit: z.number().optional().default(100).describe("Maximum number of users to return (default 100, max 200)"), }, },
  • index.ts:340-356 (registration)
    MCP server registration of the slack_get_users tool, including schema, description, and handler that calls SlackClient.getUsers and returns JSON response.
    server.registerTool( "slack_get_users", { title: "Get Slack Users", description: "Get a list of all users in the workspace with their basic profile information", inputSchema: { cursor: z.string().optional().describe("Pagination cursor for next page of results"), limit: z.number().optional().default(100).describe("Maximum number of users to return (default 100, max 200)"), }, }, async ({ cursor, limit }) => { const response = await slackClient.getUsers(limit, cursor); return { content: [{ type: "text", text: JSON.stringify(response) }], }; } );

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

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