Skip to main content
Glama
mrz1880

mcp-keycloak-admin

List client roles

keycloak_client_roles_list
Read-onlyIdempotent

Retrieve client-level roles for a Keycloak client using its internal ID. Returns a JSON array of role objects with id, name, and description to identify roles for assignment.

Instructions

Read-only: lists the client-level roles defined on a single Keycloak client (not realm roles). Use this to discover available client role names before assigning one with keycloak_user_client_role_assign; for realm-wide roles use keycloak_role_list instead. Returns a JSON array of roles (each with id, name, and description), or the message 'Client not found.' when no client matches the given ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clientIdYesThe Keycloak client's internal ID (the client's UUID, e.g. 'a1b2c3d4-...'), not the human-readable clientId/client name. Identifies the client whose roles are listed.
Behavior4/5

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

Reinforces read-only behavior (consistent with annotations), describes output as JSON array with fields, and mentions error message 'Client not found.' Adds context beyond annotations.

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 sentences, no fluff, front-loaded with key info. Efficient and scannable.

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?

Fully covers input, output, error, usage guidance, and alternative. No missing pieces given low complexity and good annotations.

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

Parameters4/5

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

Schema coverage is 100% and description does not repeat param details, but it adds value by clarifying clientId is UUID not human-readable name. Baseline 3, extra clarification bumps to 4.

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?

Clearly states the tool lists client-level roles for a single Keycloak client, distinguishes from realm roles, and specifies read-only. Includes return format and error case.

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

Usage Guidelines5/5

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

Explicitly tells when to use (discover roles before assignment) and when not (use keycloak_role_list for realm roles). Names sibling tool keycloak_user_client_role_assign.

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