Skip to main content
Glama
Keycloak MCP Server

Keycloak MCP Server

by Cayetano97

add_client_client_scope_mappings

Add client-level roles to a Keycloak client's scope by mapping roles from a target client, enabling permission assignment through MCP clients.

Instructions

Add client-level roles to the client's scope.

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>",
      "client_uuid": "<client_uuid>",
      "target_client_uuid": "<target_client_uuid>",
      "roles": "<roles>"
    },
    "name": "add_client_client_scope_mappings"
  }
}

Input Schema

NameRequiredDescriptionDefault
realmYesRealm name
rolesYesList of role representations
client_uuidYesClient UUID
target_client_uuidYesUUID of the target client whose roles are mapped

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

C2.6/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 disclosure burden for a mutation operation, and it does almost none of that work. It does not state whether the call is idempotent, whether duplicate mappings raise an error, what permissions are required, or whether existing scope assignments are replaced or appended.

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?

It is a single front-loaded sentence with no filler or repetition. Its brevity is efficient, though it borders on under-specification rather than genuine economy.

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?

For a four-required-parameter mutation tool with a nested object parameter, no annotations, no output schema, and many confusable siblings, a single seven-word sentence is far too thin. An agent would need to guess at the mapping direction, error behavior, and role payload shape before calling it safely.

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 all four parameters (realm, client_uuid, target_client_uuid, roles) are already documented in the schema, establishing the baseline of 3. The description adds no meaning beyond the schema and in particular does not clarify the relationship between client_uuid and target_client_uuid or the shape of the nested roles object.

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 names a verb and resource ("Add client-level roles to the client's scope") and hints at a client-vs-realm role distinction, which is the key differentiator among siblings like add_client_realm_scope_mappings. However, it never explains the name's dual-client concept (client_uuid plus target_client_uuid) or what source of roles is being mapped, so an agent cannot confidently distinguish this from add_client_scope_client_scope_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?

There is no when-to-use guidance, no prerequisites (e.g., existing client or role requirements), and no mention of alternatives despite a dense cluster of near-identical add_* siblings. The only signal is the phrase "client-level roles," which implies but does not state when this is preferable to realm-scope or client-scope mapping tools.

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