Skip to main content
Glama
AIops-tools

identity-aiops

client_sessions

Retrieve active sessions for a Keycloak client by internal ID; returns paginated session list with truncation indicator.

Instructions

[READ] Active user sessions on one client (Keycloak).

KEYCLOAK ONLY. authentik has no per-provider session listing, so on an authentik target this returns {"error": "Resource 'client_sessions' is not mapped for platform 'authentik'..."}. That is a platform-capability answer, not a fault: switch approach (user_sessions per user) rather than retrying or reporting the tool as broken.

Args: client_id: Internal id, from list_clients. max_results: Page bound (default 200). target: IdP target name from config; omit for the default.

Returns {"sessions": [...], "returned": N, "limit": L, "truncated": bool}, with truncated measured rather than guessed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetNo
client_idYes
max_resultsNo
Behavior5/5

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

With no annotations, the description carries full burden. It discloses the read-only nature ('[READ]'), the platform-specific error response format, and how to interpret it (as a capability answer, not a fault). It also specifies the return schema and truncation semantics, going well beyond the structured fields.

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 structured with a summary line, a platform caveat, an Args list, and a Returns section. Every sentence provides necessary context (platform limitations, error behavior, return shape) without fluff. It is front-loaded with the core purpose.

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?

Given the platform-specific behavior, no output schema, and no annotations, the description covers all necessary context: return format, pagination/truncation, error handling, and parameter prerequisites. It is fully self-contained for an agent to invoke correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must explain parameters. It does so for all three: client_id ('Internal id, from list_clients'), max_results ('Page bound (default 200)'), and target ('IdP target name from config; omit for the default'). This adds real meaning beyond bare titles.

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 function: 'Active user sessions on one client (Keycloak).' It uses a specific verb ('list') and resource ('client sessions'), and explicitly distinguishes from sibling tools like user_sessions by noting this is per-client and Keycloak-only.

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?

It explicitly states when to use the tool ('KEYCLOAK ONLY') and provides guidance for alternative platforms: on authentik, switch to user_sessions per user rather than retrying. It also references list_clients as the source for client_id, which is a clear prerequisite.

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/AIops-tools/Identity-AIops'

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