Skip to main content
Glama

esphome_lvgl_add_widget

Add an LVGL widget to an ESPHome device page and save the configuration. Specify widget type and properties for UI customization.

Instructions

Add an LVGL widget to a page on an ESPHome device and save the config.

widget_type: LVGL widget type — label, button, slider, arc, switch, spinbox, img, line, meter, etc. properties: dict of widget properties (id, x, y, width, height, text, value, styles, ...).

Lambda callbacks (on_click, on_value_changed) are not supported here — add them manually via esphome_get_config / esphome_write_config. After adding, run esphome_validate_config then esphome_compile_device + esphome_upload_device to deploy.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
page_idYes
propertiesYes
device_nameYes
widget_typeYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states that adding a widget saves the config and that lambda callbacks are not supported, but lacks details on side effects like whether existing widgets are affected, or what happens if the page doesn't exist. The description gives some transparency but is not exhaustive.

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 six sentences, front-loaded with the purpose, followed by parameter explanations and important usage notes. Every sentence adds value, and there is no redundant or irrelevant content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of adding an LVGL widget involving config changes and deployment, the description covers the main steps and limitations. However, it does not explain the output or return value (despite an output schema existing), and it omits error handling or validation details, leaving some gaps for complete understanding.

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 schema has 0% description coverage, so the description adds significant value by explaining widget_type with examples (label, button, slider, etc.) and properties with common keys (id, x, y, width, height, text, value, styles). This compensates well for the missing schema descriptions, though it doesn't cover all possible properties.

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 clearly states the tool adds an LVGL widget to a page on an ESPHome device and saves the config. The verb 'add' and resource 'widget' are specific, and the action distinguishes it from sibling tools like esphome_lvgl_delete_widget or esphome_lvgl_get_pages.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly tells when not to use this tool for lambda callbacks, directing to use esphome_get_config/esphome_write_config instead. It also provides post-usage steps (validate, compile, upload), giving clear context on the workflow. However, it doesn't compare to other lvgl tools for scenarios like updating or deleting widgets.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Fistacho/ha-nexus-agent'

If you have feedback or need assistance with the MCP directory API, please join our Discord server