Skip to main content
Glama

logs/logins

Read-onlyIdempotent

List Linux login history or failed login attempts, filter by username and recent entry count for audits or troubleshooting.

Instructions

Lists login history (wraps last) or failed login attempts (type: "failed", wraps lastb). Read-only; returns raw text, not JSON. limit keeps the N most recent entries and user filters by username; the trailing wtmp begins... summary line is dropped and an empty history returns an empty line. last/lastb must be installed on the host. For account details use users/list, for authentication messages logs/journal-control.

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". Needs a grant for this tool in mcp-sudo.yaml

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.4.1
    • changedInput schema / properties / privileged / description
      Previous value: -"Run as root - typically required for type: \"failed\""New value: +"Run as root - typically required for type \"failed\". Needs a grant for this tool in mcp-sudo.yaml"
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), and the description adds genuinely new behavioral context: raw text rather than JSON output, the trailing 'wtmp begins...' line being dropped, empty history returning an empty line, and the root/grant requirement for failed logins.

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?

Dense and front-loaded: the primary purpose and mode mapping come first, then output caveats, then routing. Every sentence carries information, though the parenthetical tool-name references make it slightly heavy to parse.

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?

With no output schema, the description compensates by explicitly stating the return is raw text, how the summary line and empty cases behave, and what host dependencies must exist. Nothing an agent needs to call this correctly is missing.

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 description coverage is 100%, so all four parameters including the enum are already documented. The description restates limit ('keeps the N most recent entries') and user ('filters by username') but adds no format or ordering detail beyond the schema, so baseline 3 applies.

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 (login history / failed login attempts) and names the two underlying tools it wraps (`last` and `lastb`), so the agent knows exactly what is returned and which mode maps to which behavior.

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 elsewhere when appropriate: 'For account details use users/list, for authentication messages logs/journal-control.' It also states the host prerequisite (`last`/`lastb` must be installed) and the grant requirement tied to the privileged parameter.

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