Skip to main content
Glama
Keycloak MCP Server

Keycloak MCP Server

by Cayetano97

remove_client_template_realm_scope_mappings

Remove realm-level roles from a client scope in Keycloak to control which realm roles are exposed through that scope.

Instructions

Remove a set of realm-level roles from 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": "remove_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.9/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 burden. It does not say whether this only deletes the mapping (leaving the role definition intact), what happens if a listed role is not currently assigned, whether the operation is atomic or partial on failure, or what permissions/auth are required for a destructive mutation.

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 the action front-loaded and no filler. Its brevity is appropriate for the format, though it leaves little room for the behavioral context a destructive tool needs.

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 3-required-parameter mutation with a nested object argument, no annotations, and no output schema, the definition is thin: nothing on failure semantics, idempotency, or permissions. The schema covers parameter types, but the description does not compensate for the missing annotation-level safety signal.

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 does add one meaningful clarification — that the 'roles' entries are realm-level role representations being removed from the client scope — which sharpens the vague schema text 'List of role representations', but it adds nothing about realm or client_scope_id semantics.

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?

The description gives a specific verb and resource: removing realm-level roles from a client('s template) scope. It is clear what the operation performs, though it says 'the client's scope' where the tool name refers to a client template, and it never distinguishes itself from the many sibling remove_* mapping tools (e.g. remove_client_template_client_scope_mappings, remove_client_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?

There is no guidance on when to use this versus the add_/get_/remove_ alternatives, no prerequisites, and no indication of when it should not be used. The agent must infer the scenario entirely from the tool name and sibling list.

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