Skip to main content
Glama
mcp-keycloak

mcp-keycloak

List realm roles

list_realm_roles
Read-onlyIdempotent

Retrieve realm-level roles from a Keycloak realm, with secret-shaped attribute values redacted for safe role inspection.

Instructions

List the realm-level roles defined in a realm. Secret-shaped attribute values are replaced with [REDACTED].

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": {
      "realm": "<realm>"
    },
    "name": "list_realm_roles"
  }
}

Input Schema

NameRequiredDescriptionDefault
realmYesRealm name

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.2.2
    • removedInput schema / additionalProperties
      Removed value: -false
  2. 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 readOnly, idempotent, non-destructive and open-world, so safety is covered. The description adds one genuinely useful non-obvious behavior — secret-shaped attribute values are replaced with [REDACTED] — which tells the agent why it may see masked data. It says nothing about pagination, result size, or whether composite roles are included.

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 short sentences that are front-loaded with the action and scope, followed by the one caveat that matters. Nothing is wasted.

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?

For a single-parameter read tool with no output schema, the definition covers purpose and data-masking behavior adequately. It leaves open whether results are paginated or filtered, which matters for an open-world list operation on realms that may hold many roles.

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?

Only one parameter, and the schema documents it ('Realm name') at 100% coverage. The description reinforces the realm scoping in prose but adds no new syntax or constraints beyond what the schema provides.

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?

Specific verb plus resource with a scope qualifier ('realm-level roles defined in a realm'), which separates it from client-role concepts. It does not name a sibling, but the sibling set targets entirely different resources (clients, groups, users), so an agent can still place it without opening the schema.

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 the phrasing — an agent gathers that this is the tool for enumerating roles in a given realm. There is no explicit when/when-not guidance, no note about client-level roles being excluded, and no alternative tool named.

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