Skip to main content
Glama
identity-aiops

identity-aiops

login_events

Read-only

Retrieve normalized login events from Keycloak or Authentik to troubleshoot authentication failures, audit user access, and analyze patterns by user, event type, or IdP target.

Instructions

[READ] Recent authentication events, normalized (time/type/user/ip/client/error).

Args: event_type: Platform vocabulary — Keycloak LOGIN / LOGIN_ERROR, authentik login / login_failed (case-insensitive). user: Optional username / user-id filter. max_results: Page bound (default 200, max 500). target: IdP target name from config; omit for the default.

Returns {"events": [...], "returned": N, "limit": L, "truncated": bool}. truncated is measured (one extra event is fetched), not guessed — when it is true, more events exist; re-run with a higher max_results rather than treating the partial feed as the whole picture. Optional fields an event did not carry are null, never "".

Input Schema

NameRequiredDescriptionDefault
userNo
targetNo
event_typeNo
max_resultsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations declare readOnlyHint=true, and the '[READ]' prefix plus normalized-field list is consistent with that. It adds beyond the annotations by explaining that truncation is measured via an extra fetched event rather than guessed, and that absent optional fields are null rather than empty string — genuinely useful behavioral detail. It does not cover permissions or rate limits.

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?

Structured into a purpose line, an Args block, and a Returns block, with the core identity front-loaded. Slightly long for a four-parameter read tool, but each sentence carries distinct information rather than restating the schema.

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, but the description describes the return envelope (events, returned, limit, truncated) and the meaning of the truncated flag and null optional fields. Combined with full parameter coverage and the read-only profile, an agent has everything needed to call and interpret this tool.

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?

With 0% schema coverage and no enums declared in the schema, the description fully carries parameter meaning: it enumerates the platform event_type values (Keycloak LOGIN/LOGIN_ERROR, authentik login/login_failed, case-insensitive), explains user and target semantics, and gives max_results bounds (default 200, max 500). Nothing about the parameters is left undocumented.

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?

Opens with a specific verb+resource and scope: '[READ] Recent authentication events, normalized' plus the normalized field set (time/type/user/ip/client/error). This is enough to separate it from siblings like admin_events and login_failure_rca, which serve different purposes.

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?

It gives real operational guidance — the event_type vocabulary per IdP, that target should be omitted for the default, and how to act on truncated results (re-run with higher max_results). However, it never states when to choose this tool over the adjacent login_failure_rca or admin_events sibling, so alternative selection is left implicit.

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