Skip to main content
Glama
idoyudha

mcp-keycloak

by idoyudha

delete_group

Remove a group from Keycloak identity management by specifying its ID and optional realm to maintain clean access control structures.

Instructions

Delete a group.

Args:
    group_id: Group ID
    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 delete_group tool handler function, decorated with @mcp.tool() for registration. Deletes a Keycloak group by ID using the KeycloakClient and returns a status message.
    @mcp.tool()
    async def delete_group(group_id: str, realm: Optional[str] = None) -> Dict[str, str]:
        """
        Delete a group.
    
        Args:
            group_id: Group ID
            realm: Target realm (uses default if not specified)
    
        Returns:
            Status message
        """
        await client._make_request("DELETE", f"/groups/{group_id}", realm=realm)
        return {"status": "deleted", "message": f"Group {group_id} deleted successfully"}
  • Registration of the delete_group tool via the @mcp.tool() decorator.
    @mcp.tool()
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states 'Delete a group' which implies a destructive mutation, but doesn't disclose behavioral traits such as permissions required, whether deletion is permanent or reversible, impact on associated users or data, or any rate limits. This leaves significant gaps for an agent to understand the tool's behavior safely.

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

Conciseness4/5

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

The description is appropriately sized and front-loaded with the core purpose. The Args and Returns sections are structured clearly, though the 'Returns' statement is vague ('Status message'). There's minimal waste, but it could be more informative without sacrificing brevity.

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 the tool's complexity (destructive operation with 2 parameters), no annotations, and an output schema exists (which covers return values), the description is moderately complete. It defines parameters and states the action, but lacks critical context like behavioral risks and usage guidelines, making it adequate but with clear gaps for safe invocation.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must compensate. It adds basic semantics for both parameters: 'group_id' is identified as 'Group ID' and 'realm' as 'Target realm (uses default if not specified)'. This clarifies their roles beyond the schema's titles, but doesn't provide format details, examples, or constraints, leaving some ambiguity.

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 ('Delete') and resource ('a group'), making the purpose immediately understandable. However, it doesn't differentiate this tool from other destructive operations like 'delete_client' or 'delete_user' among the siblings, which would require specifying what makes group deletion unique.

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. With siblings like 'delete_client' and 'delete_user', there's no indication of prerequisites, consequences, or when deletion is appropriate versus updating or other operations. The description lacks any context for decision-making.

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