Skip to main content
Glama
Keycloak MCP Server

Keycloak MCP Server

by Cayetano97

get_organization_group_client_role_mappings

Retrieve client-level role mappings for a specified organization group and client in Keycloak; use it to audit which app roles are assigned to that group.

Instructions

Get client-level role mappings for the user or group, and the app. 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>",
      "client_id": "<client_id>"
    },
    "name": "get_organization_group_client_role_mappings"
  }
}

Input Schema

NameRequiredDescriptionDefault
realmYesRealm name
org_idYesOrganization ID
group_idYesOrganization group ID
client_idYesClient UUID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

C2.9/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It usefully discloses a version prerequisite ("Requires Keycloak 26.7+"), but it does not explain whether returned mappings are direct or inherited, what permissions are needed, or what the response contains.

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?

The description is only two sentences and front-loads the operation, with the Keycloak version note compactly stated. The vague "user or group" phrase is a minor structural flaw, but there is no padding or repetition.

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 four-parameter, fully required read tool with no annotations or output schema, the definition is minimally adequate because the schema documents every parameter. However, it leaves out the direct-versus-effective distinction and other sibling differentiation that would help an agent call the correct tool.

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%, with each of the four required parameters documented. The description adds no syntax or meaning beyond the schema, and its "user or group" wording does not map cleanly to the documented group_id parameter, so baseline 3 is appropriate.

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

Purpose3/5

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

The description states a specific verb and resource ("Get client-level role mappings"), but the phrase "for the user or group, and the app" is ambiguous because the schema requires group_id and client_id and has no user parameter. It also does not distinguish this direct-mapping tool from similarly named siblings such as get_effective_organization_group_client_role_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 description gives no when-to-use guidance, no exclusions, and no indication of how this differs from the many effective and non-organization-group variants. An agent has to infer the distinction from the tool name and required parameters alone.

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