get_client
Retrieve a specific Keycloak client configuration using its database ID. Specify a realm to access clients across different authentication domains.
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-55 (handler)The handler function for the 'get_client' MCP tool. It is decorated with @mcp.tool() for registration and retrieves a specific 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)
- src/tools/client_tools.py:43-43 (registration)The @mcp.tool() decorator registers the get_client function as an MCP tool.@mcp.tool()
- src/tools/client_tools.py:44-55 (schema)The function signature and docstring define the input schema (id: str required, realm: Optional[str]) and output (Dict[str, Any]) for the 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)