Skip to main content
Glama

delete_realm_role

Remove a role from a Keycloak realm to manage user permissions and access control. Specify the role name and optionally the target realm.

Instructions

Delete a realm role. Args: role_name: Role name to delete realm: Target realm (uses default if not specified) Returns: Status message

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
role_nameYes
realmNo

Implementation Reference

  • Handler function for delete_realm_role tool. Deletes the specified realm role using KeycloakClient and returns success status.
    @mcp.tool() async def delete_realm_role( role_name: str, realm: Optional[str] = None ) -> Dict[str, str]: """ Delete a realm role. Args: role_name: Role name to delete realm: Target realm (uses default if not specified) Returns: Status message """ await client._make_request("DELETE", f"/roles/{role_name}", realm=realm) return { "status": "deleted", "message": f"Realm role {role_name} deleted successfully", }

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