Skip to main content
Glama
Keycloak MCP Server

Keycloak MCP Server

by Cayetano97

get_effective_user_realm_role_mappings

Retrieves a user's effective composite realm-level role mappings, including inherited roles, to audit or troubleshoot Keycloak permissions.

Instructions

Get effective (composite) realm-level role mappings for a 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>"
    },
    "name": "get_effective_user_realm_role_mappings"
  }
}

Input Schema

NameRequiredDescriptionDefault
realmYesRealm name
user_idYesUser ID
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
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 burden and mostly restates the tool name. The parenthetical '(composite)' is the only real behavioral disclosure, hinting that composite roles are expanded; nothing is said about permission requirements, pagination, or whether indirect group memberships are included.

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; the scope qualifiers are packed efficiently. It is perhaps too terse for the differentiation job it needs to do, but nothing is wasted.

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 simple three-parameter read of a well-documented schema with no output schema, the essentials are present. It falls short on clarifying how 'effective' differs from the direct-mapping sibling and on any behavioral or permission context.

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%, including the non-obvious briefRepresentation flag, so the schema already does the explanatory work. The description adds no parameter-level meaning beyond that, which matches the baseline for full coverage.

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 a precisely scoped resource: effective/composite realm-level role mappings for a user. The 'effective (composite)' qualifier implicitly separates it from the direct-mapping sibling get_user_realm_role_mappings, though it never names that sibling.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied by the word 'effective' — an agent can infer this returns resolved composite roles rather than directly assigned ones, but there is no explicit when-to-use or when-to-prefer-the-direct-mapping-tool statement.

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