Skip to main content
Glama
Keycloak MCP Server

Keycloak MCP Server

by Cayetano97

get_effective_user_client_role_mappings

Retrieves effective client-level role mappings for a Keycloak user, including composite roles, to review assigned access.

Instructions

Get effective (composite) client-level role mappings for the user.

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>",
      "user_id": "<user_id>",
      "client_id": "<client_id>"
    },
    "name": "get_effective_user_client_role_mappings"
  }
}

Input Schema

NameRequiredDescriptionDefault
realmYesRealm name
user_idYesUser UUID
client_idYesClient UUID
briefRepresentationNoif false, return roles with their attributes

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?

No annotations are supplied, so the description carries the full burden. It conveys that results include composite (inherited) roles rather than only direct assignments, and 'Get' implies a read operation, but it says nothing about permission requirements, result size/pagination, or whether an empty result is possible.

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?

A single front-loaded sentence with no filler. It is appropriately sized for a simple read, though slightly terse given the surrounding family of near-identical sibling tools.

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?

With four parameters, no annotations, and no output schema, the description does the minimum: it identifies the resource and hints at composite semantics. It leaves the return shape (role list vs. mapping objects) and the distinction from direct-mapping siblings unexplained, which matters in this crowded family.

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 realm, user_id, client_id and briefRepresentation all documented in the schema. The description adds no parameter-level meaning beyond that, which is the expected baseline when the schema is complete.

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 (get) and resource (effective client-level role mappings) for a scoped subject (the user). The word 'effective/composite' meaningfully separates it from the direct-mapping sibling get_user_client_role_mappings, though it never names that sibling or explicitly contrasts the two.

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 explicit guidance on when to choose this over get_user_client_role_mappings or get_effective_user_realm_role_mappings. The 'effective/composite' phrasing hints at a different result set, but the agent must infer the selection condition entirely.

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