Skip to main content
Glama
mrz1880

mcp-keycloak-admin

Log out user

keycloak_user_logout
Destructive

Revoke all active sessions for a Keycloak user, forcing them to re-authenticate. Requires explicit confirmation to proceed.

Instructions

Destructive write that revokes all active sessions for a user, forcing them to re-authenticate, and returns "User logged out." on success or a "Not logged out: " message if confirmation was declined. Requires explicit confirmation: pass confirm=true, otherwise the operation is blocked pending approval. The account itself stays enabled; use keycloak_user_set_enabled to block future logins or keycloak_user_sessions_list to inspect sessions first. Effectively idempotent: once sessions are revoked, a repeat call has nothing left to revoke.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe Keycloak user id (UUID) whose sessions will be revoked. Required; obtain it from keycloak_user_search.
confirmNoMust be true to proceed; if omitted or false, the logout is blocked pending confirmation. Optional; defaults to false.
Behavior5/5

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

Beyond annotations, the description adds details: destructive nature, confirmation requirement, return messages, user account remains enabled, and effective idempotence. It even explains the behavior if sessions are already revoked.

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

Conciseness4/5

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

Description is well-structured and front-loaded. While slightly long, every sentence serves a purpose, explaining action, effect, prerequisites, and alternatives. Could be trimmed slightly but effective.

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 tool with 2 parameters, no output schema, the description covers purpose, parameters, return values, and edge cases (idempotency). It's sufficiently complete for an agent to use correctly.

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?

Schema coverage is 100%, so baseline 3. Description adds meaning: id is from keycloak_user_search, confirm must be true to proceed. Adds context beyond parameter descriptions.

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 clearly states the tool's purpose: 'Destructive write that revokes all active sessions for a user, forcing them to re-authenticate'. It distinguishes from siblings like keycloak_user_set_enabled and keycloak_user_sessions_list by specifying what this tool does vs them.

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

Usage Guidelines5/5

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

Explicitly states when to use (for logout) and provides alternatives: 'use keycloak_user_set_enabled to block future logins or keycloak_user_sessions_list to inspect sessions first'. Also explains the required confirmation with confirm=true.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mrz1880/mcp-keycloak-admin'

If you have feedback or need assistance with the MCP directory API, please join our Discord server