Skip to main content
Glama
mgcrea

@mgcrea/mcp-keycloak

by mgcrea

keycloak_list_client_roles

Read-only

List client roles for a Keycloak client by its UUID, separating them from realm roles.

Instructions

List the roles defined by a client. Note these are distinct from realm roles — realm-management's roles (view-users, manage-users, ...) are client roles.

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).
searchNo
clientUuidYesClient UUID (the `id` field), NOT the clientId string. See keycloak_list_clients.
Install Server

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, and the description is consistent with that. It adds valuable behavioral scope by clarifying that realm-management's roles are actually client roles, which corrects a likely incorrect expectation about what this endpoint returns. This goes beyond the annotation alone.

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?

Two concise sentences with no filler. The core purpose is front-loaded, and the clarifying realm-vs-client-role note is placed immediately after. Every sentence earns its place.

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 read-only list tool, the description plus schema is nearly complete. It explains the key distinction from realm roles, the required clientUuid is documented, and pagination/offset defaults are in the schema. The lack of an output schema is not a major gap for a simple list operation, though a brief mention of return shape could be argued.

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 high (80%), so the schema already documents the main parameters well. The description does not add parameter-level meaning beyond what the schema provides. The clientUuid lookup semantics are already covered in the schema, so the description adds minimal parameter value. Baseline 3 is appropriate.

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 the verb and resource: 'List the roles defined by a client.' It also distinguishes this from realm roles, which is essential because sibling tools include keycloak_list_realm_roles. The realm-management example reinforces the distinction and prevents a common misclassification.

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 implies when to use this tool versus keycloak_list_realm_roles by noting client roles are distinct from realm roles. It does not name the alternative explicitly or state exclusions, but the realm-management example provides clear contextual guidance about the boundary.

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