Skip to main content
Glama
Keycloak MCP Server

Keycloak MCP Server

by Cayetano97

remove_organization_group_realm_role_mappings

Deletes realm-level role mappings from an organization group in Keycloak, removing assigned realm roles for the specified organization, group, and roles. Requires Keycloak 26.7+.

Instructions

Delete realm-level role mappings. Requires Keycloak 26.7+.

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>",
      "org_id": "<org_id>",
      "group_id": "<group_id>",
      "roles": "<roles>"
    },
    "name": "remove_organization_group_realm_role_mappings"
  }
}

Input Schema

NameRequiredDescriptionDefault
realmYesRealm name
rolesYesList of role representations
org_idYesOrganization ID
group_idYesOrganization group 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 burden. It usefully discloses the Keycloak 26.7+ requirement and implies a destructive operation, but says nothing about permissions, idempotency, what happens when a listed role mapping does not exist, or whether the operation is atomic.

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?

Two short sentences with no filler, and the core action is front-loaded. It is efficient but borders on under-specified for a four-parameter destructive operation.

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 destructive mutation with no annotations, no output schema, and a nested roles payload. The description does not state authorization prerequisites, return behavior, or error semantics, leaving significant gaps for an agent deciding whether and how to call it.

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 each of the four required parameters is documented in the schema. The description adds no meaning beyond that, which is acceptable at baseline but offers no help with the nested 'roles' object shape.

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 gives a verb and resource ('Delete realm-level role mappings'), but omits the organization-group scope that distinguishes this tool from close siblings such as remove_group_realm_role_mappings and remove_organization_group_client_role_mappings. The agent must fall back on the tool name alone to know which entity's mappings are deleted.

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 counterparts or the group-level and client-level variants. The only contextual hint is a version prerequisite (Keycloak 26.7+), which is a compatibility constraint rather than usage guidance.

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