Skip to main content
Glama

get_failed_logins

Retrieve recent failed login attempts with summary statistics for login triage; reads lastb or falls back to journalctl, defaulting to 20 entries.

Instructions

Returns recent failed login attempts (excluding Boot records) with summary statistics. Read-only: lastb -n N, falling back to journalctl if btmp is not readable. Default 20 entries. Errors are non-fatal. Use for login-attempt triage; get_audit_logs for auditd AVC and syscall events.

Input Schema

NameRequiredDescriptionDefault
linesNonumber of recent entries (default: 20)

Output Schema

NameRequiredDescriptionDefault
errorsNo
entriesYes
summaryYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations the description carries the full burden, and it delivers: read-only nature, the underlying commands (lastb with journalctl fallback), the unreadable-btmp contingency, and notably that errors are non-fatal. It omits permission/auth prerequisites, but the operational behavior is well disclosed for a diagnostic read.

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?

Short, front-loaded sentences with no filler: purpose first, then mechanism, default, error behavior, and routing. It is efficient, though the mechanism sentence is slightly dense for the value it adds.

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?

An output schema exists, so return values needn't be explained, and the description covers scope, mechanism, default, and failure behavior. What an agent needs to select and invoke the tool correctly is essentially present.

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?

Schema coverage is 100% and the single parameter is fully documented there, so the baseline is 3. The description adds only marginal meaning by mapping the count to 'lastb -n N' and restating the default of 20, which the schema already states.

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 and resource ('Returns recent failed login attempts') and adds scope precision ('excluding Boot records') plus the output character ('with summary statistics'). It is clearly distinguishable from siblings like get_logged_in_users and get_audit_logs without opening either schema.

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?

Explicitly routes the agent: 'Use for login-attempt triage' states the intended task, and 'get_audit_logs for auditd AVC and syscall events' names the alternative and the condition that selects it. Nothing is left to inference.

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