Skip to main content
Glama

Validate an ESPHome device's LVGL structure

esphome_lvgl_validate
Read-onlyIdempotent

Check an ESPHome device's LVGL structure locally for duplicate page or widget IDs and missing default_page references before running a full config validation.

Instructions

Validate an ESPHome device's LVGL structure client-side, without the dashboard.

Checks for duplicate page/widget IDs and default_page references that don't exist among the parsed pages. This is a structural check only — it does not validate widget properties or ESPHome component correctness.

Use when: a quick local pre-check after editing LVGL pages/widgets, before a full esphome_validate_config or esphome_compile_device. Not for: full component/property validation — use esphome_validate_config. Returns: {"device", "valid": <bool>, "pages": <count>, "widgets": <count>, "issues": [...]}. Errors: {"error": "...", "valid": False} when the file can't be found/parsed, or when there is no lvgl: section in the device config.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
device_nameYesDevice name, with or without the '.yaml' suffix, e.g. 'kitchen_display'.

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 / device_name / description
      Added value: +"Device name, with or without the '.yaml' suffix, e.g. 'kitchen_display'."
  2. Addedv0.18.2

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare the safety profile (readOnly, idempotent, non-destructive, closed-world), so the bar is lower. The description adds real behavioral context the annotations don't: what it checks structurally, that it deliberately does NOT validate widget properties or component correctness, and its error behavior when the file is missing or has no lvgl: section.

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?

Front-loads the core purpose, then uses labeled Use when / Not for / Returns / Errors blocks that are easy to scan. It is somewhat long and the Returns/Errors content partly duplicates the output schema, but each sentence still carries information.

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?

Given an output schema exists, return values need not be described, yet the description also documents them plus error shapes and the no-lvgl-section edge case. 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?

Only one parameter (device_name) with 100% schema description coverage, including the '.yaml'-optional format. The description adds nothing beyond what the schema already documents, 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 ('Validate an ESPHome device's LVGL structure client-side') and immediately scopes what is actually checked (duplicate page/widget IDs, dangling default_page references). It explicitly distinguishes itself from esphome_validate_config, so an agent can separate it from the list/compile/validate siblings without opening a 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?

Contains explicit routing: 'Use when: a quick local pre-check after editing LVGL pages/widgets, before a full esphome_validate_config or esphome_compile_device' and 'Not for: full component/property validation — use esphome_validate_config.' Both the when and the when-not/alternative are named.

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