Skip to main content
Glama
mgcrea

@mgcrea/mcp-keycloak

by mgcrea

keycloak_list_realm_roles

Read-only

Fetch realm-level roles from a Keycloak realm, with optional name search and pagination. Returns core role fields to conserve context, ideal for role discovery and management workflows.

Instructions

List the realm-level roles defined in a realm.

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).
searchNoFilter roles by name (infix match).
briefRepresentationNoReturn only the core fields of each item. Keep this true when listing — full representations are large and a big realm will flood the context.
Install Server

TDQS

A3.5/5.0
Behavior3/5

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

The readOnlyHint annotation already establishes the non-destructive read profile, so the description does not need to restate that. It adds the realm-level scope but does not disclose additional behaviors such as pagination behavior or the large-response risk; the latter appears only in the briefRepresentation parameter description.

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?

The description is one short sentence with no filler or redundancy, and the key action and resource are front-loaded. Every word earns its place.

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

Completeness3/5

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

The description is sufficient for a basic read-only list operation when combined with the parameter schema and readOnlyHint, but it leaves no room for disambiguation among many sibling role/group/user list tools and does not describe the return shape (no output schema is present).

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 the baseline is 3 even though the tool description adds no parameter detail. However, the schema's 'search' parameter description is mis-copied from 'realm', and the tool description does not compensate for that potential confusion.

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 states a specific verb ('List') and a precise resource ('realm-level roles defined in a realm'), which distinguishes it from related siblings such as keycloak_list_client_roles and keycloak_get_realm_role. It is not a tautology and adds useful realm-vs-client scope.

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 tool versus alternatives, no mention of sibling tools, and no exclusion criteria. The description only states what the tool does; an agent must infer selection from the tool name and the sibling list.

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