Skip to main content
Glama

Get an ESPHome device's LVGL styles

esphome_lvgl_get_styles
Read-onlyIdempotent

Reads LVGL theme, style definitions, and gradients from an ESPHome device's YAML config. Use it to check available styles before referencing them in new widgets.

Instructions

Get the LVGL theme and style definitions from an ESPHome device config.

Parses the device's YAML and reads the lvgl: section's theme, style_definitions and gradients keys.

Use when: checking what theme/styles a device's LVGL UI currently uses before referencing a style name in a new widget. Not for: page/widget content — use esphome_lvgl_get_pages/ esphome_lvgl_get_page_widgets. Returns: {"device", "theme", "style_definitions", "gradients"}. Errors: {"error": "..."} 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.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), so the bar is lower. The description adds real context beyond that: it parses YAML, reads specific lvgl section keys, defines the return object shape, and specifies error conditions ('file can't be found/parsed' or 'no lvgl: section'). It stops short of deeper traits like caching or file-size limits, but the added disclosure is substantial.

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 purpose followed by clean labeled sections (Use when / Not for / Returns / Errors). Every sentence carries distinct information with no redundancy or filler.

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?

An output schema exists, so return-value explanation was not strictly required, yet the description conveniently enumerates the keys. Combined with explicit error handling and sibling routing, an agent has everything needed to call this correctly.

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?

With a single parameter at 100% schema description coverage, the schema already documents device_name including the '.yaml' suffix handling. The description adds no additional parameter meaning, so the baseline of 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+resource ('Get the LVGL theme and style definitions from an ESPHome device config') and names the exact keys it reads (theme, style_definitions, gradients). It explicitly distinguishes itself from sibling tools esphome_lvgl_get_pages and esphome_lvgl_get_page_widgets, so an agent can route correctly 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?

Provides explicit 'Use when' (checking what theme/styles a device's LVGL UI uses before referencing a style name in a new widget) and 'Not for' clauses, naming the two sibling alternatives to use instead. Both the condition and the exclusions are spelled out rather than inferred.

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