list_users
Retrieve all users in a Slack workspace with optional parameters to limit results and include locale information for each user.
Instructions
List all users in the Slack workspace.
Args: limit: Maximum number of users to return include_locale: Include locale information for each user
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| include_locale | No |
Implementation Reference
- slack_mcp/server.py:257-272 (handler)The main MCP tool handler for 'list_users'. Decorated with @mcp.tool() for registration. Creates SlackClient, calls its list_users method, and returns JSON-formatted result.@mcp.tool() async def list_users(limit: int = 100, include_locale: bool = False) -> str: """ List all users in the Slack workspace. Args: limit: Maximum number of users to return include_locale: Include locale information for each user """ try: client = SlackClient() result = await client.list_users(limit, include_locale) return json.dumps(result, indent=2) except Exception as e: return json.dumps({"error": str(e)}, indent=2)
- slack_mcp/server.py:92-95 (helper)Helper method in SlackClient class that makes the API call to Slack's 'users.list' endpoint.async def list_users(self, limit: int = 100, include_locale: bool = False) -> Dict[str, Any]: """List all users in the workspace.""" params = {"limit": limit, "include_locale": include_locale} return await self._make_request("GET", "users.list", params=params)