Skip to main content
Glama
Keycloak MCP Server

Keycloak MCP Server

by Cayetano97

invite_user_to_organization

Invite an existing user or send a registration link to a new user by email, adding them to a Keycloak organization; requires Keycloak 25+.

Instructions

Invites an existing user or sends a registration link to a new user, based on the provided e-mail address. 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_user_to_organization"
  }
}

Input Schema

NameRequiredDescriptionDefault
realmYesRealm name
org_idYesOrganization ID
client_idNoClient id
invitation_dataYesForm fields: email, firstName, lastName

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose two real behavioral facts: the call reaches out to a user by e-mail and the Keycloak 25+ version prerequisite. It omits important side effects such as whether an e-mail is actually dispatched, required permissions, and what happens if the user is already a member or already invited.

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?

Two short sentences, front-loaded with the core action and followed by the version constraint. Every clause carries information and nothing is padded.

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?

For a mutation tool with no annotations and no output schema, the definition covers the core action and a version prerequisite but leaves prerequisite permissions, error/idempotency behavior for existing members, and the returned artifact (invitation record?) unaddressed. Adequate to invoke, thin for operating confidently.

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 100%, so the baseline would be 3, but the description adds essentially nothing beyond what the schema already says — it merely restates that the e-mail address drives behavior. The optional client_id and the realm/org_id scoping are never explained in the description, leaving the nested invitation_data fields to the schema alone.

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 or sends a registration link") tied to an e-mail address, which is concrete enough to act on. It only partially separates itself from the sibling invite_existing_user_to_organization, since the description folds both the existing-user invite and the new-user registration-link behavior into one tool.

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?

The branching rule (existing user vs. new user determined by the e-mail address) is useful implied guidance about when this tool applies. However, no alternative tool is named, and there is no statement about when NOT to use it — notably no pointer to invite_existing_user_to_organization or delete_organization_invitation.

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