Skip to main content
Glama

get_realm_role

Retrieve a specific realm role by name from Keycloak identity and access management. Specify the role name and optionally the target realm to obtain the role object.

Instructions

Get a specific realm role by name. Args: role_name: Role name realm: Target realm (uses default if not specified) Returns: Role object

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
realmNo
role_nameYes

Implementation Reference

  • The @mcp.tool()-decorated async function implementing the get_realm_role tool. It fetches the specific realm role by name using the KeycloakClient._make_request method to perform a GET request to /roles/{role_name} endpoint.
    @mcp.tool() async def get_realm_role(role_name: str, realm: Optional[str] = None) -> Dict[str, Any]: """ Get a specific realm role by name. Args: role_name: Role name realm: Target realm (uses default if not specified) Returns: Role object """ return await client._make_request("GET", f"/roles/{role_name}", 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