get_client
Retrieve a specific client by its database ID from the Keycloak identity and access management server, specifying the target realm if needed, and return the client object.
Instructions
Get a specific client by database ID.
Args:
id: The client's database ID (not client_id)
realm: Target realm (uses default if not specified)
Returns:
Client object
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| realm | No |
Implementation Reference
- src/tools/client_tools.py:43-56 (handler)The core handler function for the 'get_client' MCP tool. Decorated with @mcp.tool() for automatic registration and schema generation from signature and docstring. Fetches a Keycloak client by its database ID.@mcp.tool() async def get_client(id: str, realm: Optional[str] = None) -> Dict[str, Any]: """ Get a specific client by database ID. Args: id: The client's database ID (not client_id) realm: Target realm (uses default if not specified) Returns: Client object """ return await client._make_request("GET", f"/clients/{id}", realm=realm)