Skip to main content
Glama
mcp-keycloak

mcp-keycloak

by idoyudha

get_user

Retrieve a specific Keycloak user by ID, optionally from a target realm, to inspect identity details and account information.

Instructions

Get a specific user by ID.

Args:
    user_id: The user's ID
    realm: Target realm (uses default if not specified)

Returns:
    User object

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": {
      "user_id": "<user_id>"
    },
    "name": "get_user"
  }
}

Input Schema

NameRequiredDescriptionDefault
realmNo
user_idYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.3.0
    • addedOutput schema / additionalProperties
      Added value: +true
    • removedOutput schema / properties
      Removed value: -{
      -  "result": {
      -    "additionalProperties": true,
      -    "title": "Result",
      -    "type": "object"
      -  }
      -}
    • removedOutput schema / required
      Removed value: -[
      -  "result"
      -]
    • changedOutput schema / title
      Previous value: -"get_userOutput"New value: +"get_userDictOutput"
  2. First observed

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden. It implies a read via 'Get' and names the return type, but says nothing about failure modes (nonexistent ID), permission requirements for reading a user in another realm, or what 'default realm' resolves to. The 'Returns: User object' line adds little given an output schema exists.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The definition is short and front-loaded with the purpose, which is good. However, the Args block largely restates the schema titles and the Returns block restates information already available via the output schema, so several lines do not earn their 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?

Because an output schema exists, the description need not explain the returned User object. But with 0% schema description coverage on two parameters and no annotations, the definition should say more about ID format, realm semantics/default resolution, and not-found behavior. It is minimally adequate rather than complete.

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 0% — the schema only carries titles 'User Id' and 'Realm'. The description adds genuine meaning for realm ('Target realm, uses default if not specified') but the user_id gloss ('The user's ID') is tautological and never says what form the ID takes (UUID, username, keycloak ID). Partial compensation for a low-coverage schema.

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 first sentence gives a specific verb and resource — 'Get a specific user by ID' — which is immediately distinguishable from siblings such as get_user_groups, get_user_sessions, or create_user. It stops short of explicitly contrasting with those siblings, but the core fetch-by-ID purpose is unmistakable.

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 when-to-use guidance: nothing tells the agent when to call this versus get_user_groups or get_user_realm_roles, nor what preconditions hold (e.g., must the caller know the ID already, must the realm be accessible). The only contextual hint is 'uses default if not specified' for realm, which is parameter-level rather than usage-level.

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