Skip to main content
Glama
piekstra

Slack MCP Server

by piekstra

get_user_info

Retrieve detailed information about a specific Slack user, including user ID, by leveraging the Slack MCP Server for seamless user management and data access.

Instructions

Get detailed information about a specific Slack user.

Args: user_id: The ID of the user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
user_idYes

Implementation Reference

  • The primary handler function for the 'get_user_info' MCP tool. It is registered via the @mcp.tool() decorator and implements the tool logic by instantiating SlackClient and calling its get_user_info method to retrieve user information from the Slack API, returning the result as 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)
  • Supporting helper method in the SlackClient class that performs the actual Slack API call to the 'users.info' endpoint to fetch detailed 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)

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

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