Skip to main content
Glama

regenerate_client_secret

Generate a new client secret for a specified client in the Keycloak IAM system. Provide the client's database ID and optional realm to update credentials securely.

Instructions

Regenerate the client secret. Args: id: The client's database ID realm: Target realm (uses default if not specified) Returns: New client secret object

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
realmNo

Implementation Reference

  • The handler function for the 'regenerate_client_secret' MCP tool. It is decorated with @mcp.tool(), which handles both registration and schema inference from the function signature and type hints. The function regenerates the client secret by making a POST request to Keycloak's API via the KeycloakClient instance.
    @mcp.tool() async def regenerate_client_secret( id: str, realm: Optional[str] = None ) -> Dict[str, str]: """ Regenerate the client secret. Args: id: The client's database ID realm: Target realm (uses default if not specified) Returns: New client secret object """ return await client._make_request( "POST", f"/clients/{id}/client-secret", 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