Skip to main content
Glama
dockndevai

mcp-keycloak

Get user by id

get_user
Read-onlyIdempotent

Fetch a single Keycloak user representation by realm and user ID (UUID) to inspect account details. Use it when you need one user's attributes, roles, or status from a specific realm.

Instructions

Fetch a single user representation by their Keycloak id.

Input Schema

TableJSON 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

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint, and destructiveHint=false, so the safety profile is covered. The description adds only that the result is a single user 'representation' looked up by id; it says nothing about behavior when the id is unknown (error vs empty) or about realm scoping. Some added value, but not rich.

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?

One sentence with zero filler, and the identifying constraint (by their Keycloak id) is front-loaded. Nothing needs trimming or reordering.

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-only lookup with full schema coverage, complete annotations, and no output schema to explain, the description is nearly sufficient. It could have noted the not-found behavior or the realm scoping requirement, but nothing essential blocks correct invocation.

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% and the schema fully documents both realm and userId (UUID). The description only echoes the Keycloak id concept already stated in the schema, adding no format, casing, or realm-relationship detail beyond it. 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?

States a specific verb (fetch), resource (user), and scope (a single user) keyed by Keycloak id, which cleanly separates it from the list_users/count_users siblings. It stops short of naming those siblings explicitly, so it is clear but not maximally differentiating.

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?

No when-to-use guidance, no prerequisites, and no routing to alternatives such as list_users for enumeration or searching by attribute. The agent must infer from context that this is the point-lookup path rather than a filter path.

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