Skip to main content
Glama
mrz1880

mcp-keycloak-admin

Assign a realm role to a group

keycloak_group_role_assign
Idempotent

Grants a specified realm role to a group, so all its members inherit the role. Idempotent; reassigning an already-granted role has no effect.

Instructions

Write operation. Grants an existing realm role to a group, so the group's members inherit that role. Idempotent: re-assigning an already-granted role makes no further change. Resolve the group ID with keycloak_group_list and ensure the realm role exists beforehand. Returns a message stating the role was assigned, or, if it could not be, that it was not assigned with the reason.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
roleYesName of an existing realm role to assign, e.g. "admin". Must match an existing realm role name exactly.
groupIdYesID of the group to grant the role to (the group's UUID from keycloak_group_list).
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Discloses idempotent behavior (matches annotation), write operation, and return value message including error reporting. The description adds context beyond the annotations, which already mark idempotentHint=true.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, each essential. Starts with operation type, then behavior, then prerequisites and return. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter idempotent assignment tool with no output schema, the description covers prerequisites, idempotency, return format, and error handling, making it fully self-contained.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Adds critical context beyond schema: group ID should be resolved via keycloak_group_list, role name must match exactly. This aids correct parameter selection despite 100% schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it grants a realm role to a group, making members inherit the role. It uses specific verbs ('Grants', 'assigns') and resource ('realm role', 'group'), distinguishing it from sibling tools like user_role_assign or client_role_assign.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit prerequisites: resolve group ID via keycloak_group_list and ensure realm role exists. Mentions idempotency. Does not explicitly state when not to use (e.g., for user roles), but sibling names imply the distinction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mrz1880/mcp-keycloak-admin'

If you have feedback or need assistance with the MCP directory API, please join our Discord server