Skip to main content
Glama
Keycloak MCP Server

Keycloak MCP Server

by Cayetano97

add_client_template_realm_scope_mappings

Add realm-level roles to a Keycloak client scope so clients using that scope receive the intended role mappings.

Instructions

Add a set of realm-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>",
      "roles": "<roles>"
    },
    "name": "add_client_template_realm_scope_mappings"
  }
}

Input Schema

NameRequiredDescriptionDefault
realmYesRealm name
rolesYesList of role representations
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 supplied, so the description carries the full behavioral burden. It states only the additive effect and does not say whether existing mappings are preserved, what permissions are required, whether the call is idempotent, or what it returns.

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. The brevity does introduce ambiguity around 'client's scope' and the omitted template qualifier, though that is primarily a completeness issue rather than wasted wording.

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 mutation tool with nested role objects, no annotations, and no output schema, the description is too thin. It omits which object is being modified (client template versus client/client scope), permissions, side effects, and return behavior, leaving significant gaps.

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 the baseline is 3. The description loosely maps 'set of realm-level roles' to the roles parameter and 'client's scope' to client_scope_id, but adds no format or nesting details beyond what the schema already provides.

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?

States the verb 'add' and the resource 'realm-level roles' to a client scope, but omits the 'client template' qualifier present in the tool name. That makes it hard to distinguish from siblings such as add_client_realm_scope_mappings or add_client_scope_realm_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?

No when-to-use guidance, prerequisites, or comparison to sibling tools is provided. The agent must infer whether this targets a client template, a client, or a client scope.

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