Skip to main content
Glama
identity-aiops

identity-aiops

client_session_stats

Read-only

Count active Keycloak sessions per client, ordered by busiest first, to identify clients driving current login activity.

Instructions

[READ] Active-session counts per client, busiest first (Keycloak).

KEYCLOAK ONLY. authentik has no per-client session rollup, so on an authentik target this returns {"error": "Resource 'client_session_stats' is not mapped for platform 'authentik'..."}. A platform-capability answer, not a fault — do not retry.

Args: target: IdP target name from config; omit for the default.

Returns {"clients": [...], "returned": N, "truncated": false} — the rollup is unbounded, so this listing is always complete.

Input Schema

NameRequiredDescriptionDefault
targetNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A4.6/5.0
Behavior5/5

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

Beyond readOnlyHint=true, it discloses the platform-capability limitation verbatim (including the error payload the agent will see), that the condition is not a fault and should not be retried, and that the rollup is unbounded so results are always complete. This is exactly the context annotations cannot carry.

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?

Front-loaded with the verb+resource+scope, then a clearly delimited KEYCLOAK ONLY warning and Args/Returns blocks. The quoted error string is somewhat long, but it earns its place by preventing a retry loop.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description supplies the return shape ({"clients", "returned", "truncated"}) and states truncation can never occur. Combined with the platform caveat, an agent has everything needed to call and interpret this 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 0% for the single 'target' parameter, so the description must compensate — and it does, explaining the value comes from config ('IdP target name from config') and that omitting it selects the default. Minor gap: no note on what happens with an unknown target name.

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?

States a specific verb+resource with scope and ordering ('Active-session counts per client, busiest first') and names the platform it applies to (Keycloak). An agent can distinguish it from siblings like client_sessions or user_sessions without opening schemas.

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

Usage Guidelines4/5

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

Explicitly states when NOT to use it (KEYCLOAK ONLY; authentik returns a mapping error) and instructs 'do not retry', which prevents wasted calls. It does not, however, route the agent to a specific alternative (e.g. client_sessions) for the unsupported platform.

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