Skip to main content
Glama
shigechika

keycloak-mcp

by shigechika

get_login_failures_by_ip

Retrieve login failure counts grouped by source IP to identify brute-force attacks and suspicious login patterns within a specified date range.

Instructions

Get login failure statistics broken down by source IP.

Time-bounded: this call stops after KEYCLOAK_DEADLINE seconds (default 45) and returns what it has; the counts are then a lower bound. The result then starts with a "PARTIAL RESULT" warning. Call again with a narrower window instead of retrying the same call. A wide window on a busy day is what triggers it.

Args: date_from: Start date (YYYY-MM-DD). Defaults to last 24h when omitted (KEYCLOAK_DEFAULT_DATE_FROM_HOURS). date_to: End date (YYYY-MM-DD). Empty for all. top: Number of top IPs to show (default 20).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topNo
date_toNo
date_fromNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral burden and does so well: it discloses the KEYCLOAK_DEADLINE timeout (default 45s), that results are truncated with counts becoming a lower bound, that the result is prefixed with a 'PARTIAL RESULT' warning, and the correct retry strategy. This is non-obvious failure-mode and output-shape information an agent could not get from the schema.

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?

Purpose is front-loaded in the first sentence, followed by the deadline/partial-result caveat and a compact Args block. The multi-sentence timeout passage is slightly verbose but each sentence carries actionable content, and the Args block adds real value given the empty schema descriptions.

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 3-parameter, zero-annotation tool with an output schema present, the definition covers the main behavioral risk (timeout/partial results) and the parameter semantics. It omits permission/auth requirements and any note on how the per-IP breakdown is ordered or bounded by top, but these are minor gaps given an output schema exists.

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 description coverage is 0%, so the description must compensate and largely does: it supplies the format (YYYY-MM-DD) for date_from/date_to, the semantics of an empty date_to ('all'), the 24h default for date_from, and clarifies that top is the number of top IPs to show. All three parameters are covered, though the interaction between date_to empty and date_from default is not fully spelled out.

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?

States a specific verb and resource with an explicit aggregation dimension: 'login failure statistics broken down by source IP.' This is clearly distinguishable from siblings like get_login_stats_by_client and get_ip_activity, though it never names those alternatives directly, so sibling routing is left to inference rather than stated.

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?

Gives concrete condition-based guidance for the partial-result case: a wide window on a busy day triggers the deadline, and the correct recovery is to re-call with a narrower window rather than retry. It does not, however, say when to prefer this tool over the other login/client/IP statistics siblings.

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