Skip to main content
Glama
idoyudha

mcp-keycloak

by idoyudha

remove_realm_default_group

Remove a default group from a Keycloak realm to manage user access and permissions by specifying the group ID and optional realm.

Instructions

Remove a default group from the realm.

Args:
    group_id: Group ID to remove from defaults
    realm: Target realm (uses default if not specified)

Returns:
    Status message

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
group_idYes
realmNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function decorated with @mcp.tool(), implementing the logic to remove a group from the realm's default groups via Keycloak API. This serves as both the tool handler and its registration.
    @mcp.tool()
    async def remove_realm_default_group(
        group_id: str, realm: Optional[str] = None
    ) -> Dict[str, str]:
        """
        Remove a default group from the realm.
    
        Args:
            group_id: Group ID to remove from defaults
            realm: Target realm (uses default if not specified)
    
        Returns:
            Status message
        """
        await client._make_request("DELETE", f"/default-groups/{group_id}", realm=realm)
        return {
            "status": "removed",
            "message": f"Group {group_id} removed from default groups",
        }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It states the action is 'Remove' (implying mutation) and mentions a return of 'Status message', but doesn't disclose critical traits like required permissions, whether the change is reversible, effects on users, or error conditions. This leaves significant gaps for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is efficiently structured with a clear purpose statement followed by Args and Returns sections. Each sentence earns its place by conveying essential information without redundancy, making it easy to parse and front-loaded with the main action.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given a mutation tool with no annotations, 2 parameters, and an output schema (implied by 'Returns: Status message'), the description is partially complete. It covers parameters well but lacks behavioral context like permissions or side effects. The output schema reduces need to explain returns, but overall completeness is moderate due to missing usage and transparency details.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the description compensates by explaining both parameters: 'group_id' as 'Group ID to remove from defaults' and 'realm' as 'Target realm (uses default if not specified)'. This adds meaningful context beyond the bare schema, clarifying purpose and default behavior, though it doesn't detail formats or constraints.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Remove') and resource ('default group from the realm'), making the purpose understandable. It distinguishes from siblings like 'add_realm_default_group' by specifying removal rather than addition, though it doesn't explicitly contrast with all similar tools like 'remove_user_from_group'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. The description lacks context about prerequisites (e.g., needing admin permissions), when removal is appropriate, or what happens after removal. It mentions a default realm behavior but doesn't explain implications.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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