Skip to main content
Glama

get_user

Retrieve a specific user's details by ID from Keycloak identity management, optionally specifying a realm for targeted access.

Instructions

Get a specific user by ID. Args: user_id: The user's ID realm: Target realm (uses default if not specified) Returns: User object

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
user_idYes
realmNo

Implementation Reference

  • The main handler for the 'get_user' MCP tool. It is decorated with @mcp.tool() which registers it with the MCP server using the function name as the tool name. The function retrieves a specific user by ID from the Keycloak realm.
    @mcp.tool() async def get_user(user_id: str, realm: Optional[str] = None) -> Dict[str, Any]: """ Get a specific user by ID. Args: user_id: The user's ID realm: Target realm (uses default if not specified) Returns: User object """ return await client._make_request("GET", f"/users/{user_id}", realm=realm)

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/idoyudha/mcp-keycloak'

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