Skip to main content
Glama
Keycloak MCP Server

Keycloak MCP Server

by Cayetano97

invite_existing_user_to_organization

Invites an existing Keycloak user to an organization by user ID, enabling you to add known users to a specified realm's organization without creating new accounts. Requires Keycloak 25+.

Instructions

Invites an existing user to the organization, using the specified user id. Requires Keycloak 25+.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "realm": "<realm>",
      "org_id": "<org_id>",
      "invitation_data": "<invitation_data>"
    },
    "name": "invite_existing_user_to_organization"
  }
}

Input Schema

NameRequiredDescriptionDefault
realmYesRealm name
org_idYesOrganization ID
invitation_dataYesForm fields: id (ID of the existing user)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden. It discloses one genuinely useful prerequisite (Keycloak 25+), but says nothing about whether an invitation email/notification is dispatched, what happens on duplicate invitation, required permissions, or idempotency of 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.

Conciseness4/5

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

Two short sentences, front-loaded with the action and followed by a hard prerequisite that earns its place. No filler, though 'using the specified user id' is mildly redundant with the schema.

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?

A mutation tool with a nested parameter, no annotations, and no output schema needs more: failure modes, side effects (invitation sent?), and permission requirements are absent. The version prerequisite is the only behavior disclosed, leaving a moderate gap for an agent to call this correctly.

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 coverage is 100% and the nested invitation_data object already documents 'id (ID of the existing user)'. The description's 'using the specified user id' merely restates that, adding no format, constraint, or validation detail beyond the schema.

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?

States a specific verb+resource ('Invites an existing user to the organization') with a clear qualifier — the user must already exist — which implicitly separates it from the sibling invite_user_to_organization that presumably invites by email/identifier rather than an existing user id. It does not name the sibling explicitly, so it falls short of a 5.

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

Usage Guidelines3/5

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

'existing user' and 'using the specified user id' imply the selection condition versus the other invite tool, but the routing is left to inference. There is no explicit when-not guidance (e.g. what to do if the user is already a member), so it is adequate-at-best context.

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

Deploy Server

Other Tools