Skip to main content
Glama

Get add-on log lines

supervisor_get_addon_logs
Read-onlyIdempotent

Debug a specific Home Assistant add-on by fetching its recent log lines.

Instructions

Get the most recent log lines from one add-on.

Calls GET /addons/<slug>/logs, which returns plain text, and keeps only the last lines lines.

Use when: debugging one add-on's runtime behaviour. Not for: the ESPHome add-on's per-device compile/upload logs — use esphome_get_addon_logs if that distinction matters to the caller. Returns: {"logs": "<joined log lines>"}. Errors: {"error": "invalid_slug"} for a bad slug; {"error": "SUPERVISOR_TOKEN not set or empty response"} when the token is missing; {"error": "HTTP <status>", "detail": ...} on a Supervisor API error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugYesAdd-on slug to fetch logs for, e.g. from `supervisor_list_addons`.
linesNoMaximum number of most-recent log lines to return. 100 by default; 0 or negative returns the full fetched log text.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.25.1
    • addedInput schema / properties / lines / description
      Added value: +"Maximum number of most-recent log lines to return. 100 by default; 0 or negative returns the full fetched log text."
    • addedInput schema / properties / slug / description
      Added value: +"Add-on slug to fetch logs for, e.g. from `supervisor_list_addons`."
  2. First observedv0.3.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is covered. The description adds useful behavioral context: the underlying GET endpoint, that it returns plain text, truncation behavior for `lines`, the exact return shape, and specific error cases including missing token. This goes beyond the annotations, though it could still mention authentication prerequisites more directly.

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 front-loaded with the core action, then structured with 'Use when', 'Not for', 'Returns', and 'Errors' labels. Every sentence earns its place with no redundancy.

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, two-parameter tool with full schema coverage and an output schema, the description is complete: it states purpose, usage boundaries, the alternative tool, return shape, and error modes. Nothing an agent needs to invoke it 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%, and the schema already documents both `slug` (with example source) and `lines` (default and 0/negative behavior). The description references `lines` only obliquely ('keeps only the last `lines` lines'), adding no meaning beyond the schema, so the baseline 3 is appropriate.

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 states a specific verb and resource ('Get the most recent log lines from one add-on') and explicitly names the sibling tool it is not, `esphome_get_addon_logs`. An agent can distinguish this from other log-related siblings 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?

It provides explicit 'Use when' (debugging one add-on's runtime behaviour) and 'Not for' (ESPHome per-device compile/upload logs) guidance, and names the alternative tool. This is precisely the routing information an agent needs.

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