Skip to main content
Glama
idoyudha

mcp-keycloak

by idoyudha

delete_client

Remove a client from a Keycloak realm by specifying its database ID to manage identity and access control.

Instructions

Delete a client.

Args:
    id: The client's database ID
    realm: Target realm (uses default if not specified)

Returns:
    Status message

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
realmNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for the 'delete_client' tool. It deletes a Keycloak client by its database ID using a DELETE request via the KeycloakClient instance. The @mcp.tool() decorator registers it as an MCP tool.
    @mcp.tool()
    async def delete_client(id: str, realm: Optional[str] = None) -> Dict[str, str]:
        """
        Delete a client.
    
        Args:
            id: The client's database ID
            realm: Target realm (uses default if not specified)
    
        Returns:
            Status message
        """
        await client._make_request("DELETE", f"/clients/{id}", realm=realm)
        return {"status": "deleted", "message": f"Client {id} deleted successfully"}
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states this is a deletion operation (implying destructive), but doesn't clarify if deletion is permanent, reversible, or has side effects (e.g., cascading deletions). It mentions a return value ('Status message') but doesn't describe what that entails (e.g., success/failure indicators). For a destructive tool with zero annotation coverage, this is inadequate.

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 brief and well-structured with clear sections for Args and Returns. Every sentence adds value: the first states the purpose, and the subsequent lines document parameters and return value. However, the 'Returns' section is somewhat vague ('Status message'), slightly reducing efficiency.

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 this is a destructive tool with no annotations, 0% schema coverage, but with an output schema (implied by 'Returns'), the description is moderately complete. It covers purpose and parameters adequately but lacks critical behavioral details like deletion permanence or error handling. The output schema likely documents the return structure, so the description's vagueness there is less problematic.

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 provides basic semantics for both parameters ('id' as the client's database ID, 'realm' as target realm with default behavior), which adds meaningful context beyond the schema's type definitions. However, it doesn't explain format requirements (e.g., ID structure) or realm implications (e.g., what 'default' means), leaving gaps.

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 verb ('Delete') and resource ('a client'), making the purpose immediately understandable. It distinguishes itself from other tools like 'delete_user' or 'delete_group' by specifying the target resource type. However, it doesn't specify what constitutes a 'client' in this context (e.g., OAuth client, database client), which prevents a perfect score.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing the client's ID), warn about irreversible deletion, or suggest alternatives like 'update_client' for modification instead of deletion. The agent must infer usage from the tool name alone.

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