Skip to main content
Glama

Get widgets on an ESPHome LVGL page

esphome_lvgl_get_page_widgets
Read-onlyIdempotent

Lists all LVGL widgets on an ESPHome device page by parsing its YAML, showing type, ID, position, and key properties. Use before adding or removing widgets to inspect the widget tree.

Instructions

Get all LVGL widgets on one page of an ESPHome device.

Parses the device's YAML and summarises each widget on the requested page: type, ID, position and key properties. Lambda callback values are shown as the literal string <lambda> (opaque here — use esphome_get_config to see the full source).

Use when: inspecting an existing page's widget tree before adding or removing a widget. Not for: page-level metadata only — use esphome_lvgl_get_pages. Returns: {"device", "page", "widget_count", "widgets": [...]}. Errors: {"error": "..."} when the file can't be found/parsed, when there is no lvgl: section, or when page_id doesn't exist.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
page_idYesLVGL page ID to inspect, from `esphome_lvgl_get_pages`.
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. Changed2 schema fields changedv0.25.1
    • addedInput schema / properties / device_name / description
      Added value: +"Device name, with or without the '.yaml' suffix, e.g. 'kitchen_display'."
    • addedInput schema / properties / page_id / description
      Added value: +"LVGL page ID to inspect, from `esphome_lvgl_get_pages`."
  2. Addedv0.18.2

TDQS

A4.7/5.0
Behavior5/5

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

Annotations cover the safety profile (readOnly, idempotent, non-destructive), and the description goes further: it discloses that the tool parses YAML, that lambda values are collapsed to the literal '<lambda>', the exact return shape, and the three error conditions. This is substantial context beyond structured fields.

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 clearly labeled Use when / Not for / Returns / Errors blocks. Every sentence carries distinct information; no 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?

Despite an output schema existing, the description still summarizes the return payload and enumerates error cases, and identifies the prerequisite tool for page_id. Nothing needed 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%, so both parameters are already documented with format hints ('.yaml' suffix, page_id from esphome_lvgl_get_pages). The description adds only the implicit note that a missing page_id produces an error, which is marginal over the schema baseline of 3.

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+scope ('Get all LVGL widgets on one page of an ESPHome device') and distinguishes itself from siblings like esphome_lvgl_get_pages and esphome_lvgl_add_widget. An agent can select it without opening the 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' (inspecting a page's widget tree before adding/removing) and 'Not for' naming the alternative tool esphome_lvgl_get_pages for page-level metadata. Routing is unambiguous.

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