Skip to main content
Glama
Keycloak MCP Server

Keycloak MCP Server

by Cayetano97

get_organization_group_role_mappings

Retrieve role mappings for a specific organization group in a Keycloak realm to audit or manage assigned roles. Requires Keycloak 26.7+.

Instructions

Get role mappings. Requires Keycloak 26.7+.

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>",
      "group_id": "<group_id>"
    },
    "name": "get_organization_group_role_mappings"
  }
}

Input Schema

NameRequiredDescriptionDefault
realmYesRealm name
org_idYesOrganization ID
group_idYesOrganization group ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

C2.3/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 behavioral burden, and it discloses only the Keycloak version requirement. It says nothing about whether the operation is read-only, whether results include inherited/effective mappings, whether pagination applies, or what permissions are needed to read an organization group's role mappings.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

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

Two short sentences with no filler, so nothing is wasteful. However, brevity here is under-specification rather than economy: the version note is front-loaded but the actual scope of the operation is never stated.

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?

The tool takes three required identifiers and has no output schema, so the description must convey what a "role mapping" result looks like and how it relates to the effective-vs-direct distinction. It does neither, leaving a meaningful gap for an agent deciding between this and its many siblings.

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% (realm, org_id, group_id all documented), so the schema already does the explanatory work. The description adds no meaning beyond that — e.g., no note on whether org_id/group_id must come from a prior list call or whether IDs are UUIDs — so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Get role mappings" restates the tool name almost verbatim and never clarifies which mappings — the sibling set includes realm-role, client-role, and "effective" variants, and this description gives no basis for distinguishing them. An agent cannot tell from the text whether this returns direct, effective, or both kinds of mappings.

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 guidance is a version prerequisite ("Requires Keycloak 26.7+"), which is a compatibility constraint rather than selection advice. Nothing indicates when to choose this over get_effective_organization_group_* variants or the client/realm-specific siblings.

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