Skip to main content
Glama
Keycloak MCP Server

Keycloak MCP Server

by Cayetano97

list_user_organizations_by_member

Retrieve the organizations a specified user belongs to by providing their member ID and realm; requires Keycloak 26.0+.

Instructions

Returns the organizations associated with the user that has the specified id. Requires Keycloak 26.0+.

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>",
      "member_id": "<member_id>"
    },
    "name": "list_user_organizations_by_member"
  }
}

Input Schema

NameRequiredDescriptionDefault
realmYesRealm name
member_idYesMember (user) ID
briefRepresentationNoif false, return the full representation. Otherwise, only the basic fields are returned

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 behavioral burden; it does disclose the Keycloak 26.0+ constraint, which is genuinely useful failure-mode context. It says nothing about required roles/permissions, whether results are paginated, or how briefRepresentation changes the shape of the returned objects beyond what the schema already states.

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 return behavior followed by the version constraint; nothing is redundant or 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 three-parameter read tool with no output schema and no annotations, the description is minimally adequate but omits permission requirements, result ordering/pagination, and the empty-result case. An agent could call it, but might mis-handle the two representation modes or a version mismatch.

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, member_id, and briefRepresentation are already documented. The description only restates that an id identifies the user and adds no new semantics (e.g., that member_id is a user UUID rather than a username, or the default value of briefRepresentation).

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 and resource with scope ('Returns the organizations associated with the user that has the specified id'), which is unambiguous on its own. However, it offers no differentiation from the near-identical sibling 'list_member_organizations', so an agent cannot tell the two apart from the text alone.

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 only conditional guidance is the version prerequisite ('Requires Keycloak 26.0+'). There is no statement of when to prefer this over list_member_organizations or list_organizations, and no prerequisites such as required permissions or whether the target user must be a realm member.

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