Skip to main content
Glama
Vortitron

home-assistant-mcp

by Vortitron

Edit ESPHome config

esphome_edit_config
Destructive

Change part of an ESPHome configuration in place by replacing exact text, so you avoid resending a full multi-thousand-line YAML file.

Instructions

Change part of an ESPHome configuration file in place: each edit replaces one exact piece of text with another, and must match exactly once. Prefer this to esphome_save_config for any change to an existing file: a real device's YAML runs to thousands of lines, and resending all of it to change a few is slow and risks a slip anywhere in it. Nothing is saved unless every edit applies. Requires HA_ALLOW_WRITE=true and HA_ALLOW_CONFIG_WRITE=true. Follow with esphome_validate, then esphome_upload to flash it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
editsYesApplied in order, each to the result of the one before.
instance_idNoOptional: the instance you mean (as listed by vomehome_list_instances). When given, the call is refused if this session is targeting a different home, instead of answering from it.
configurationYesConfiguration filename, e.g. 'living-room.yaml'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.10.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare destructiveHint=true and readOnlyHint=false; the description goes well beyond them by disclosing atomicity ('Nothing is saved unless every edit applies'), the exactly-one-match constraint, the ordered application of edits, and the two required environment flags (HA_ALLOW_WRITE, HA_ALLOW_CONFIG_WRITE). These are precisely the mutation semantics an agent needs before committing.

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?

Three tight sentences, front-loaded with the mechanism and the sibling preference, then prerequisites, then the follow-up workflow. Every clause carries information; no filler or restated title.

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?

For a destructive, in-place file mutation with no output schema, the description covers matching constraints, atomic failure behavior, auth preconditions, and the surrounding validate/upload workflow. An agent has everything needed to invoke it correctly and safely.

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 old_text, new_text, edits ordering, instance_id and configuration are already documented in the schema. The description restates the exact-match/unique-occurrence rule and ordered application, which largely duplicates what the schema provides rather than adding new parameter-level meaning. Baseline 3 is appropriate.

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 (change part of an ESPHome configuration file in place) and immediately specifies the mechanism: exact-text replacement matching exactly once. It explicitly names the sibling it supersedes (esphome_save_config) and the reason, so an agent can route without opening either 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?

Gives an explicit when-to-use rule ('Prefer this to esphome_save_config for any change to an existing file'), the rationale for it (thousands of lines, slow resend, slip risk), and the required follow-up chain (esphome_validate, then esphome_upload). Nothing about tool selection is left 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