Skip to main content
Glama

delete-user

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

Instructions

Delete a user from a specific realm

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
realmYes
userIdYes

Implementation Reference

  • Handler for the 'delete-user' tool: parses arguments with DeleteUserSchema, sets Keycloak realm config, deletes user by ID, returns success response.
    case "delete-user": {
      const { realm, userId } = DeleteUserSchema.parse(args);
      
      kcAdminClient.setConfig({
        realmName: realm
      });
    
      await kcAdminClient.users.del({
        id: userId,
        realm
      });
    
      return {
        content: [{
          type: "text",
          text: `User ${userId} deleted successfully from realm ${realm}`
        }]
      };
    }
  • Zod schema defining input validation for 'delete-user' tool: requires 'realm' and 'userId' strings.
    const DeleteUserSchema = z.object({
      realm: z.string(),
      userId: z.string()
    });
  • src/index.ts:62-73 (registration)
    Tool registration in ListTools handler: defines name, description, and inputSchema for 'delete-user'.
    {
      name: "delete-user",
      description: "Delete a user from a specific realm",
      inputSchema: {
        type: "object",
        properties: {
          realm: { type: "string" },
          userId: { type: "string" }
        },
        required: ["realm", "userId"]
      }
    },
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It indicates a destructive operation ('Delete'), but fails to specify whether deletion is permanent, reversible, requires admin permissions, or has side effects. This leaves significant gaps in understanding the tool's behavior.

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 a single, direct sentence with no wasted words, making it highly concise and front-loaded. It efficiently communicates the core action without unnecessary elaboration.

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

Completeness2/5

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

For a destructive tool with no annotations, 0% schema coverage, and no output schema, the description is insufficient. It lacks details on permissions, irreversibility, error handling, and return values, leaving critical context gaps for safe and effective use.

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

Parameters2/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 by explaining parameters. It mentions 'realm' and 'userId' implicitly but doesn't define their meaning, format, or constraints. This adds minimal value beyond the bare schema, failing to adequately clarify parameter semantics.

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 user from a specific realm'), making the purpose unambiguous. However, it doesn't differentiate from sibling tools like 'create-user' or 'list-users', which would require explicit comparison to achieve a score of 5.

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 like 'create-user' or 'list-users', nor does it mention prerequisites, permissions, or consequences. It simply states what the tool does without contextual usage information.

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/ChristophEnglisch/keycloak-model-context-protocol'

If you have feedback or need assistance with the MCP directory API, please join our Discord server