Skip to main content
Glama
Keycloak MCP Server

Keycloak MCP Server

by Cayetano97

add_client_template_client_scope_mappings

Adds client-level roles to a Keycloak client scope mapping, assigning roles to a specific client template scope for access control.

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_scope_id": "<client_scope_id>",
      "client_uuid": "<client_uuid>",
      "roles": "<roles>"
    },
    "name": "add_client_template_client_scope_mappings"
  }
}

Input Schema

NameRequiredDescriptionDefault
realmYesRealm name
rolesYesList of role representations
client_uuidYesClient UUID
client_scope_idYesClient scope ID

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 provided, so the description carries the full behavioral burden, and it discloses almost nothing. It does not say whether the operation is idempotent, whether it overwrites or appends to existing mappings, what permissions the caller needs, or what the response contains. Mutation semantics are only implied by the verb "Add".

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 short sentence with no filler and the verb front-loaded. It is efficient, though the terseness borders on under-specification rather than well-judged brevity.

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?

This is a four-required-parameter mutation with a nested roles object, no annotations, and no output schema. For that complexity the description is far too thin: it omits preconditions, side effects on existing scope mappings, and error behavior, none of which are covered elsewhere.

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 coverage is 100%, so each of the four required parameters is already documented in the schema. The description only adds a hint that the roles are "client-level" (versus realm-level), which is useful framing but does not explain the nested role representation or how client_scope_id and client_uuid must relate.

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 sentence gives a verb ("Add") and an object ("client-level roles to the client's scope"), which is better than a tautology. However, it blurs terminology: the tool name says client_template client scope mappings while the description says "the client's scope", leaving the agent unsure whether it targets a client or a client template. The "client-level" qualifier implicitly contrasts with realm-level siblings but never names them.

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 guidance on when to use this instead of add_client_template_realm_scope_mappings or the get_available_* counterparts. No prerequisites (realm existence, client scope already assigned, permissions) are stated, and no exclusions are given.

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