Skip to main content
Glama
mgcrea

@mgcrea/mcp-keycloak

by mgcrea

keycloak_get_client_session_count

Read-only

Count active sessions for a specific Keycloak client using its UUID to monitor current user activity.

Instructions

Count the active sessions for one client.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
realmNoRealm to operate on. Defaults to the server's configured realm (KEYCLOAK_REALM).
clientUuidYes
Install Server

TDQS

A3.8/5.0
Behavior3/5

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

The readOnlyHint annotation already signals a safe read operation, so the description does not need to repeat that. The description adds useful specificity about counting active sessions rather than listing them, but it does not disclose details like whether the count includes offline sessions or how the result is returned.

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?

The description is a single concise sentence that communicates the core operation without any filler or redundant information. It is appropriately front-loaded and easy to parse.

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 simple read-only counting operation with only two parameters, the description and schema together provide enough context for an agent to call it. The output is not documented, but for a count operation this is a minor gap given the simplicity and the readOnlyHint annotation.

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?

The schema describes the realm parameter but gives no description for clientUuid. The description's 'one client' helps clarify that clientUuid selects the target client, but it adds minimal meaning beyond that and does not fully compensate for the missing clientUuid documentation.

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 states a specific verb ('Count') and resource ('active sessions for one client'), which clearly identifies the operation. It also distinguishes itself from sibling tools like keycloak_get_client_sessions, which would list sessions rather than count them.

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

Usage Guidelines3/5

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

The phrase 'for one client' implies the tool is used when a client-level session count is needed, as opposed to realm-wide statistics. However, it does not explicitly mention alternatives such as keycloak_get_realm_session_stats or keycloak_get_client_sessions, nor does it state when not to use this tool.

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

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/mgcrea/mcp-keycloak'

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