Skip to main content
Glama

Get HA error log

history_get_error_log
Read-onlyIdempotent

Diagnose recent warnings and errors across your entire Home Assistant instance by fetching the error log as plain text from the log file or system_log records.

Instructions

Fetch Home Assistant's error log as plain text.

Prefers the raw log file via GET /api/error_log. That view only exists when HA logs to a file — Supervisor installs ship with duplicate_log_file: false, so it 404s there, in which case the warning/error records held by the system_log integration are rendered into log-file-like text instead.

Use when: diagnosing recent warnings/errors across the whole instance. Not for: one entity's history or logbook — use history_get_state_history or history_get_logbook. Returns: plain-text log content, from either source. Errors: re-raises httpx.HTTPStatusError for any status other than 404 from /api/error_log.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the safety profile is covered. The description goes well beyond them, disclosing the data-source fallback (raw /api/error_log file when HA logs to file, otherwise system_log warning/error records rendered as log-like text), the 404 condition, and the error behavior (re-raises httpx.HTTPStatusError for any non-404 status).

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?

Front-loaded with the core action, then organized into labeled sections (Use when / Not for / Returns / Errors) so an agent can scan rather than parse. The fallback explanation is longer than average but every clause carries decision-relevant information, so no sentence is padding.

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?

For a zero-param read tool with an output schema, the description still supplies the fallback semantics and error contract that the schema cannot express. Nothing an agent needs to call it correctly or interpret a 404 vs. other failure is missing.

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?

The tool takes zero parameters, which is the baseline-4 case per the rubric. The description correctly implies no inputs are needed ('Fetch ... as plain text') and does not waste space documenting nonexistent arguments.

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 ('Fetch Home Assistant's error log as plain text') and explicitly distinguishes itself from the nearest siblings, naming history_get_state_history and history_get_logbook as the tools for one entity's history/logbook. An agent can route correctly without opening any 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?

Gives an explicit 'Use when' condition (diagnosing recent warnings/errors across the whole instance) and an explicit 'Not for' exclusion with the two alternative tools named. This is the when/when-not/alternatives pattern at full strength.

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

Deploy Server

Other Tools