Skip to main content
Glama
mcp-keycloak

mcp-keycloak

Get user by id

get_user
Read-onlyIdempotent

Fetches a single Keycloak user by realm and user ID, returning the user representation with secret-shaped values and credentials redacted.

Instructions

Fetch a single user representation by their Keycloak id. Secret-shaped attribute values and credentials 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>",
      "userId": "<userId>"
    },
    "name": "get_user"
  }
}

Input Schema

NameRequiredDescriptionDefault
realmYesRealm name
userIdYesKeycloak user id (UUID)

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

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false, and openWorldHint, so the safety profile is covered. The description still adds genuine value by disclosing an output transformation: secret-shaped attributes and credentials are replaced with [REDACTED], which an agent could not infer from the annotations or schema. It stops short of describing not-found or permission-failure behavior.

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 with no filler, and the core purpose is front-loaded before the redaction caveat. Every clause carries information the agent can act on.

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 two-parameter read tool with full annotation coverage and no output schema, the description is close to complete: it states the key, the resource, and how sensitive fields are returned. Only error behavior (missing user, invalid realm) is left unaddressed.

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%, with both realm and userId already documented in the schema, so the schema carries the parameter meaning. The description adds only the phrase 'Keycloak id', which is consistent with but not richer than the schema's 'Keycloak user id (UUID)'.

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 names a specific verb ('Fetch'), a specific resource ('a single user representation'), and the exact lookup key ('Keycloak id'). The word 'single' distinguishes it from sibling list operations such as list_users and count_users without ambiguity.

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 implied by the requirement for a Keycloak id: the agent understands this is the tool to reach for once an id is known. However, there is no explicit statement of when to prefer it over list_users (e.g., to resolve an id first) and no exclusions or preconditions spelled out.

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