Skip to main content
Glama
mcp-keycloak

mcp-keycloak

by idoyudha

remove_all_user_sessions

Removes all active sessions for every user in a Keycloak realm, signing users out to revoke existing access.

Instructions

Remove all sessions for all users in the realm.

Args:
    realm: Target realm (uses default if not specified)

Returns:
    Status message

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "remove_all_user_sessions"
  }
}

Input Schema

NameRequiredDescriptionDefault
realmNo

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: +{
      +  "type": "string"
      +}
    • removedOutput schema / properties
      Removed value: -{
      -  "result": {
      -    "additionalProperties": {
      -      "type": "string"
      -    },
      -    "title": "Result",
      -    "type": "object"
      -  }
      -}
    • removedOutput schema / required
      Removed value: -[
      -  "result"
      -]
    • changedOutput schema / title
      Previous value: -"remove_all_user_sessionsOutput"New value: +"remove_all_user_sessionsDictOutput"
  2. First observed

TDQS

B3.3/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It does disclose the critical behavioral fact — that every session for every user in the realm is destroyed — but says nothing about permission requirements, irreversibility, whether the operation is idempotent, or what actually happens to affected users (forced logout).

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?

One front-loaded sentence establishes the entire scope of the operation, followed by brief Args/Returns blocks. The 'Returns: Status message' line is filler given the output schema exists, but otherwise nothing is wasted.

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?

The presence of an output schema means return values need not be explained. However, for a destructive, realm-wide, annotation-free tool, the description is thin on consequences and preconditions — an agent could invoke this without realizing it terminates sessions for every user in the environment.

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?

With 0% schema description coverage on the single parameter, the description must compensate, and it does: 'uses default if not specified' explains what the null default in the schema actually means. This is real added meaning rather than a restatement of the property name.

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 description states a specific verb and resource with an explicit blast radius: 'Remove all sessions for all users in the realm.' That scope word 'all' implicitly distinguishes it from per-user session tools like get_user_sessions or logout_user, but no sibling is named, so differentiation is left to inference.

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 or when-not-to-use guidance. For a bulk operation that logs out every user in a realm, the description never says to prefer it over logout_user for a single user, nor does it flag any precondition or approval step before running it.

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