Skip to main content
Glama

Get ESPHome device YAML config

esphome_get_config
Read-onlyIdempotent

Read an ESPHome device's YAML configuration from /config/esphome/ to inspect current settings before editing it with write or LVGL tools.

Instructions

Read one ESPHome device's YAML config from /config/esphome/.

Resolves name to <name>.yaml under _ESPHOME_DIR, rejecting path separators/leading dots/paths that escape that directory.

Use when: inspecting a device's current configuration before editing it with esphome_write_config or one of the esphome_lvgl_* editors. Not for: a device's HA entities — use esphome_get_device_entities. Returns: {"name": <filename>, "content": <yaml text>}. Errors: {"error": "Invalid device name: ..."} for a path-escaping name; {"error": "Not found: ...", "esphome_dir": ...} when the file doesn't exist.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesDevice name, with or without the '.yaml' suffix, e.g. 'kitchen_sensor'. Discover names with `esphome_list_devices`.

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 / name / description
      Added value: +"Device name, with or without the '.yaml' suffix, e.g. 'kitchen_sensor'. Discover names with `esphome_list_devices`."
  2. Addedv0.18.1

TDQS

A4.9/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 adds genuinely new behavioral detail beyond them: name-to-filename resolution, path-separator/leading-dot/escape rejection, and the exact error shapes for invalid names and missing files. This security-relevant sanitization is not inferable from annotations.

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-loads the core action, then layers usage, exclusions, return shape, and errors in clearly delimited blocks. Every line earns its place; 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?

With an output schema present, the description needn't expand on returns, yet it still documents error contracts (which the output schema likely doesn't cover) and names the correct sibling for the entity use case. Complete for a single-param read tool.

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?

Schema coverage is 100% and the schema already documents the `name` parameter including the optional '.yaml' suffix. The description reinforces the resolution rule and filesystem base directory, adding modest value (the rejection semantics) but largely aligning with what the schema states.

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?

Opens with a specific verb+resource+scope: 'Read one ESPHome device's YAML config from `/config/esphome/`'. This is clearly distinguishable from siblings like esphome_get_device_entities and esphome_list_devices, which the description explicitly contrasts.

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:' (inspecting config before editing with esphome_write_config or esphome_lvgl_* editors) and 'Not for:' (HA entities — route to esphome_get_device_entities). The alternative and its selection condition are named outright, leaving nothing to inference.

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