Skip to main content
Glama

Get ESPHome add-on log output

esphome_get_addon_logs
Read-onlyIdempotent

Fetch recent ESPHome add-on log output to diagnose compile, OTA, or device connection failures. Returns raw log lines from the Supervisor API for troubleshooting.

Instructions

Get the ESPHome add-on's recent log output.

Fetches raw text logs via the Supervisor API and returns the last lines lines. Shows compile errors, OTA status and device connection events. The add-on slug is discovered dynamically — see esphome_get_addon_info.

Use when: diagnosing why esphome_compile_device/esphome_upload_device/ esphome_validate_config failed, or checking recent device activity. Not for: any other add-on's logs — use supervisor_get_addon_logs with its slug instead. Returns: {"slug": ..., "logs": "<text>", "total_lines": <int>}. Errors: {"error": "ESPHome add-on not found. Tried: [...]"} when no matching slug responds; {"error": "HTTP <status>"} for a non-404 HTTP error; {"error": str(e)} for any other failure.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
linesNoNumber of trailing log lines to return, e.g. 150.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.25.1
    • addedInput schema / properties / lines / description
      Added value: +"Number of trailing log lines to return, e.g. 150."
  2. Addedv0.18.1

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world). The description adds real behavioral context beyond them: the slug is discovered dynamically, what the logs surface (compile errors, OTA status, connection events), and two concrete error shapes. It does not mention pagination/truncation limits of the raw text, so it stops short of a 5.

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 purpose, then cleanly sectioned into Use when / Not for / Returns / Errors. Every sentence carries decision-relevant information; nothing is filler despite the length.

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 read-only single-parameter log fetch, all an agent needs is present: purpose, selection rule, the sibling alternative, and error behavior. The return-value details are redundant given the output schema but harmless.

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% for the single `lines` parameter, so the schema already documents it. The description restates the semantics ('returns the last `lines` lines'), which confirms but does not materially extend the schema. 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 ('Get the ESPHome add-on's recent log output') and names exactly which sibling it is not ('any other add-on's logs — use supervisor_get_addon_logs'). An agent can distinguish it from that near-identical sibling 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?

Explicit 'Use when' ties it to diagnosing failed esphome_compile_device / esphome_upload_device / esphome_validate_config calls, and an explicit 'Not for' routes other add-on logs to supervisor_get_addon_logs with its slug. Both the positive and negative conditions are stated.

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