get_client_secret
Retrieve the client secret for authentication in Keycloak by specifying the client ID and optional realm.
Instructions
Get the client secret.
Args:
id: The client's database ID
realm: Target realm (uses default if not specified)
Returns:
Client secret object
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| realm | No |
Implementation Reference
- src/tools/client_tools.py:235-249 (handler)The async handler function for the 'get_client_secret' MCP tool. It is decorated with @mcp.tool(), which handles registration and schema inference. The function retrieves the client secret from the Keycloak API using the KeycloakClient instance.@mcp.tool() async def get_client_secret(id: str, realm: Optional[str] = None) -> Dict[str, str]: """ Get the client secret. Args: id: The client's database ID realm: Target realm (uses default if not specified) Returns: Client secret object """ return await client._make_request( "GET", f"/clients/{id}/client-secret", realm=realm )