get_realm_default_groups
Retrieve default groups for a Keycloak realm to manage identity and access permissions. Specify a target realm or use the default configuration.
Instructions
Get default groups for the realm.
Args:
realm: Target realm (uses default if not specified)
Returns:
List of default groups
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| realm | No |
Implementation Reference
- src/tools/realm_tools.py:214-225 (handler)The handler function for the 'get_realm_default_groups' MCP tool. It is decorated with @mcp.tool() for automatic registration and retrieves the list of default groups for a specified realm (or default) by making a GET request to the Keycloak API endpoint "/default-groups" using the KeycloakClient instance.@mcp.tool() async def get_realm_default_groups(realm: Optional[str] = None) -> List[Dict[str, Any]]: """ Get default groups for the realm. Args: realm: Target realm (uses default if not specified) Returns: List of default groups """ return await client._make_request("GET", "/default-groups", realm=realm)