Skip to main content
Glama

update_group

Modify Keycloak group details, including name, path, and attributes, with optional realm customization, ensuring accurate identity and access management.

Instructions

Update a group. Args: group_id: Group ID name: New group name path: New group path attributes: New group attributes realm: Target realm (uses default if not specified) Returns: Status message

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
attributesNo
group_idYes
nameNo
pathNo
realmNo

Implementation Reference

  • The main handler function for the 'update_group' tool. It fetches the current group, updates the provided fields (name, path, attributes), performs a PUT request via KeycloakClient, and returns a success message. Registered via @mcp.tool() decorator.
    @mcp.tool() async def update_group( group_id: str, name: Optional[str] = None, path: Optional[str] = None, attributes: Optional[Dict[str, List[str]]] = None, realm: Optional[str] = None, ) -> Dict[str, str]: """ Update a group. Args: group_id: Group ID name: New group name path: New group path attributes: New group attributes realm: Target realm (uses default if not specified) Returns: Status message """ # Get current group current_group = await client._make_request( "GET", f"/groups/{group_id}", realm=realm ) # Update only provided fields if name is not None: current_group["name"] = name if path is not None: current_group["path"] = path if attributes is not None: current_group["attributes"] = attributes await client._make_request( "PUT", f"/groups/{group_id}", data=current_group, realm=realm ) return {"status": "updated", "message": f"Group {group_id} updated 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