Skip to main content
Glama

logs/logins

Check user login history or failed login attempts on your Linux system, filtering by user and limiting recent entries. Returns raw text from last/lastb.

Instructions

Lists login history (wraps last) or failed login attempts (type: "failed", wraps lastb). Returns raw text, not JSON - last/lastb's output isn't safe to hand-parse into structured data reliably.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNo"success" (default, wraps `last`) or "failed" (wraps `lastb`)
userNoOnly return entries for this username
limitNoOnly return this many most recent entries
privilegedNoRun as root - typically required for type: "failed"

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It clearly states that output is raw text rather than JSON and explains why: `last`/`lastb` output isn't reliable to hand-parse. This is important behavioral context that goes beyond the schema, though it could also mention that this is a read-only operation.

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 concise, well-structured, and front-loaded with the core purpose followed by the mode distinction and the critical raw-text warning. Every sentence contributes meaningful information without redundancy.

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?

Given four optional parameters, high schema coverage, and no output schema, the description provides the essential extra context: raw text output and command wrapping behavior. It could add a brief note about the output format of `last`/`lastb`, but the current description is adequate for an agent to select and invoke the tool correctly.

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?

The input schema has 100% description coverage, so the description does not need to repeat parameter meanings. The main description adds useful context about what the `type` parameter maps to in terms of underlying commands, but this is already partially covered by the schema. This is a solid baseline performance.

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 lists login history and explicitly distinguishes the two modes: successful logins via `last` and failed attempts via `lastb`. This makes the tool's purpose easy to understand and differentiates it from other log-related siblings like `logs/dmesg` and `logs/journal-control`.

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?

The description gives clear usage context by explaining the `type` parameter and which command each mode wraps, and it warns that `failed` typically requires root privileges. It does not explicitly mention alternatives or when not to use this tool, but the scope is sufficiently clear from the description and sibling names.

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