get_client_secret
Retrieve the client secret from Keycloak using the client's database ID and optional realm. Simplify access management tasks by fetching the required secret object directly.
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)Handler function for the 'get_client_secret' MCP tool. Decorated with @mcp.tool(), which handles registration and schema inference from signature/docstring. Calls KeycloakClient._make_request to fetch the client secret.@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 )