Skip to main content
Glama

Failed units

svc_failed
Read-onlyIdempotent

Lists failed systemd units with their last error lines to explain why a service failed without reading the entire journal.

Instructions

Failed systemd units with their last error lines. Answers "why did it fail?" without pulling the whole journal.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "svc_failed"
  }
}

Input Schema

NameRequiredDescriptionDefault
linesNoJournal lines per unit

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare the safe read-only, idempotent, non-destructive profile, so the description only needs to add context. It usefully scopes the output to failed units plus error lines, but says nothing about behavior when no units have failed, whether journal access requires elevated permissions, or how much history is scanned.

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?

Two tight sentences with zero filler; the core purpose is front-loaded and the second sentence justifies the tool's existence by contrasting with full journal retrieval.

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 simple read-only tool with one optional parameter and no output schema, the description covers what is returned and the scope of retrieval, which is what an agent needs to call it. Only edge details like empty-result behavior and permission requirements are 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 coverage is 100% and the single `lines` parameter already carries a description with default, minimum, and maximum. The description adds no meaning about how `lines` affects output, so the baseline of 3 applies since the schema does all the work.

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 resource (failed systemd units) and what it returns (their last error lines), which is far more precise than the title alone. It implicitly separates itself from journal-wide tools by saying it avoids 'pulling the whole journal,' though it never names log_query or log_errors directly.

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 phrase "Answers 'why did it fail?' without pulling the whole journal" gives a clear selection context: use this for targeted failure diagnosis rather than full log retrieval. There are no explicit exclusions or named alternatives, so an agent must infer that a journal tool is the fallback when more context is needed.

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