Skip to main content
Glama

create_group

Create a new group in Keycloak with specified name, path, attributes, and optional target realm. Returns a status message upon completion.

Instructions

Create a new group. Args: name: Group name path: Group path attributes: Group attributes realm: Target realm (uses default if not specified) Returns: Status message

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
attributesNo
nameYes
pathNo
realmNo

Implementation Reference

  • The handler function for the 'create_group' tool. It is decorated with @mcp.tool() for registration and uses KeycloakClient to create a new group by sending a POST request to the Keycloak API.
    @mcp.tool() async def create_group( name: str, path: Optional[str] = None, attributes: Optional[Dict[str, List[str]]] = None, realm: Optional[str] = None, ) -> Dict[str, str]: """ Create a new group. Args: name: Group name path: Group path attributes: Group attributes realm: Target realm (uses default if not specified) Returns: Status message """ group_data = {"name": name} if path: group_data["path"] = path if attributes: group_data["attributes"] = attributes await client._make_request("POST", "/groups", data=group_data, realm=realm) return {"status": "created", "message": f"Group {name} created 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