Skip to main content
Glama
mgcrea

@mgcrea/mcp-keycloak

by mgcrea

keycloak_get_user_groups

Read-only

Retrieve all groups assigned to a specific Keycloak user by user UUID, with pagination and realm support.

Instructions

List the groups a user belongs to.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
maxNoMaximum number of results to return (1-500). Defaults to 50.
firstNoPagination offset — index of the first result to return (0-based).
realmNoRealm to operate on. Defaults to the server's configured realm (KEYCLOAK_REALM).
userIdYesUser UUID (the `id` field), NOT the username. Find it with keycloak_list_users.
Install Server

TDQS

A4/5.0
Behavior3/5

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

The readOnlyHint annotation already establishes the safe read-only behavior. The description adds scope context (groups belonging to a user) but does not disclose extra behavioral traits such as return shape, pagination behavior, or whether only direct memberships are returned. With annotations covering the safety profile, this is adequate but not rich.

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?

A single, front-loaded sentence with zero waste. It conveys the essential purpose without redundancy.

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

Completeness4/5

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

For a simple read-only list operation, the description combined with the fully documented schema is sufficient for an agent to select and invoke the tool. The only minor gap is that no output schema or return-format note is provided, but the name and description make the result type inferable.

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%, with all four parameters (userId, max, first, realm) described in the schema. The tool description itself adds no parameter-level meaning, so the baseline of 3 applies.

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 'List the groups a user belongs to' uses a specific verb and resource with a clear scope (a user's groups). It is clearly distinguishable from siblings like keycloak_list_groups (all groups) and keycloak_get_group_members (users in a group).

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?

The description provides clear context: this is the tool for retrieving groups for a specific user, implying when it should be selected over list_groups or get_group_members. It does not explicitly name alternatives or exclusions, but the scope is unambiguous.

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

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/mgcrea/mcp-keycloak'

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