logout_user
Terminate all active sessions for a user in a given Keycloak realm to log them out.
Instructions
Log out a user by revoking all sessions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| realm | Yes | Realm name | |
| user_id | Yes | User ID |
Terminate all active sessions for a user in a given Keycloak realm to log them out.
Log out a user by revoking all sessions.
| Name | Required | Description | Default |
|---|---|---|---|
| realm | Yes | Realm name | |
| user_id | Yes | User ID |
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It states the tool revokes all sessions, indicating a destructive action. However, it does not disclose required permissions, reversibility, side effects, or whether the user can log in again. Minimal but acceptable for a simple operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence with no extraneous information. It is concise, front-loaded, and efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (two parameters, no output schema), the description is nearly complete. It lacks information about return values or error conditions, but these are minor gaps. Overall sufficient for an agent to understand the tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with descriptions for both parameters ('Realm name' and 'User ID'). The description adds no additional meaning beyond what the schema already provides. Baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's action: 'Log out a user by revoking all sessions.' It specifies the verb (logout), resource (user via realm and user_id), and mechanism (revoking all sessions). This distinguishes it from siblings like 'logout_all_realm_sessions' and 'delete_user'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description lacks explicit guidance on when to use this tool versus alternatives (e.g., 'logout_all_realm_sessions' or 'revoke_user_consent'). No prerequisites or exclusions are mentioned. Usage is implied but not clarified.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/paoloamato2/keycloak-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server