Skip to main content
Glama

skycloak_list_user_roles

Read-only

Lists the realm roles assigned to a specific user in a Keycloak realm, helping you audit or verify a user's access permissions.

Instructions

List the realm roles assigned to a user.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "cluster_id": "<cluster_id>",
      "realm": "<realm>",
      "user_id": "<user_id>"
    },
    "name": "skycloak_list_user_roles"
  }
}

Input Schema

NameRequiredDescriptionDefault
realmYesthe Keycloak realm name
user_idYesthe user ID
cluster_idYesthe cluster ID

Output Schema

NameRequiredDescriptionDefault
countYes
rolesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered and the bar is lower. The description adds no further context such as ordering, pagination, or what happens for an unknown user; the presence of an output schema removes the need to describe return values.

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 sentence with zero filler, front-loading the operation and the scope. Nothing in it is redundant and no reading past the first clause is required.

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?

The tool is simple: three fully documented required parameters, a complete annotation set, and an output schema. The only real gap is the absence of sibling differentiation against list_application_roles and list_realm_roles, which keeps it short of a 5.

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 coverage is 100%, so cluster_id, realm, and user_id are each documented in the schema itself. The description only echoes that the listing is user-scoped and realm-level; it adds no format or constraint detail beyond the structured fields, so the baseline 3 applies.

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

Purpose4/5

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

The description states a specific verb and resource ("List the realm roles") and bounds the scope to a single user, which distinguishes it from a catalog-wide listing like skycloak_list_realm_roles. It never names siblings such as skycloak_list_application_roles, so an agent must infer whether application roles are excluded.

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

Usage Guidelines3/5

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

Usage is only implied by "assigned to a user" – read this to inspect a user's current role grants. There is no explicit when-to-use, no when-not, and no pointer to the sibling tools for assigning or removing roles or for listing all realm roles.

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

Deploy Server

Other Tools