Skip to main content
Glama
Vortitron

home-assistant-mcp

by Vortitron

Read a config file

ha_read_config_file
Read-only

Read files from Home Assistant's config directory, including configuration.yaml, packages, and binary assets when base64 encoding is set. Use before editing so you can append and save changes back.

Instructions

Read a file under Home Assistant's config directory — configuration.yaml, a package, an included YAML file, or (with encoding='base64') a packaged binary asset such as an icon or a data file a custom integration ships.

Read this before writing it: ha_write_config_file replaces the whole file, so the way to add a section is read, append, write back. Requires the ha:files scope.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesFile relative to the config root, e.g. 'configuration.yaml'.
encodingNo'utf8' (default) for text; 'base64' for a binary file, which otherwise fails with 'not UTF-8 text'.
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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.10.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, so the safety profile is covered. The description adds real behavioral context beyond that: the ha:files scope requirement, the warning that writing replaces the whole file, and the fact that binary reads fail with 'not UTF-8 text' unless base64 is used.

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?

Two tight paragraphs, front-loaded with what can be read and followed by the one workflow-critical caution. No filler sentences; each clause carries usable information.

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 read-only tool with no output schema and fully documented parameters, the definition covers file scope, encoding behavior, scope requirement, and the interaction with the writer sibling. Nothing an agent needs to call it correctly is missing.

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%, so the baseline is 3. The description nonetheless adds practical meaning for the encoding parameter (base64 for icons/data files a custom integration ships) and frames path as relative to the config root, exceeding what the schema alone conveys.

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 (Read) and resource (a file under Home Assistant's config directory) and enumerates the concrete file kinds (configuration.yaml, packages, included YAML, base64 binary assets). This distinguishes it from siblings like ha_get_config, ha_write_config_file, and ha_edit_config_file without needing 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 Guidelines4/5

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

Explicitly instructs 'Read this before writing it' and explains the read-append-write-back workflow because ha_write_config_file replaces the whole file, plus names the required ha:files scope. It stops short of contrasting with ha_get_config or ha_edit_config_file directly, so it is clear context rather than full alternative routing.

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