get_user_info
Retrieve detailed profile information for a specific Slack user by providing their user ID. This tool enables user management within Slack workspaces.
Instructions
Get detailed information about a specific Slack user.
Args: user_id: The ID of the user
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_id | Yes |
Implementation Reference
- slack_mcp/server.py:274-287 (handler)The main MCP tool handler for 'get_user_info'. It instantiates SlackClient and calls its get_user_info method to fetch user details from Slack API, returning formatted JSON.@mcp.tool() async def get_user_info(user_id: str) -> str: """ Get detailed information about a specific Slack user. Args: user_id: The ID of the user """ try: client = SlackClient() result = await client.get_user_info(user_id) return json.dumps(result, indent=2) except Exception as e: return json.dumps({"error": str(e)}, indent=2)
- slack_mcp/server.py:97-100 (helper)Helper method in SlackClient class that performs the actual Slack API call to 'users.info' endpoint to retrieve user information.async def get_user_info(self, user_id: str) -> Dict[str, Any]: """Get detailed information about a specific user.""" params = {"user": user_id} return await self._make_request("GET", "users.info", params=params)