Skip to main content
Glama
Keycloak MCP Server

Keycloak MCP Server

by Cayetano97

get_organization_invitation

Retrieve an organization invitation by ID within a Keycloak realm, enabling lookup of pending or existing invitation details. Requires Keycloak 26.5+.

Instructions

Get invitation by ID. Requires Keycloak 26.5+.

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_id": "<invitation_id>"
    },
    "name": "get_organization_invitation"
  }
}

Input Schema

NameRequiredDescriptionDefault
realmYesRealm name
org_idYesOrganization ID
invitation_idYesInvitation ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description bears full behavioral burden; "Get" implies a read but does not state it is non-mutating or side-effect free. It does add one genuinely useful fact not present in the schema — the Keycloak 26.5+ version gate — but says nothing about error conditions such as an expired or unknown invitation ID.

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 with no filler, and the core action is front-loaded before the version prerequisite. It is efficiently sized, though the terse phrasing leaves no room for the scoping detail a lookup tool typically needs.

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?

All three required parameters are documented and the lack of an output schema means return values need not be explained. However, for a three-parameter read tool with no annotations, the definition omits what the invitation object contains and how not-found or expired invitations are reported.

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 100%, so realm, org_id, and invitation_id are already documented, and the description adds only "by ID," which merely restates invitation_id. The baseline of 3 applies when the schema does the parameter work.

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?

"Get invitation by ID" states a specific verb (get) and resource (invitation) with the lookup key explicitly named. An agent can distinguish it from the delete/resend siblings by the read verb alone, though the description never names how it differs from them.

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?

There is no when-to-use guidance, no exclusions, and no mention of the delete_organization_invitation or resend_organization_invitation alternatives that operate on the same invitation. The only conditional text is an environment prerequisite, not task routing.

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