Skip to main content
Glama

List config files

files_list_config_files
Read-onlyIdempotent

List YAML, JSON, or TXT config files under the Home Assistant /config directory to discover existing files before reading or writing them. Skips secrets and .storage.

Instructions

Recursively list config files with allowed extensions under /config.

Resolves subdirectory (default the config root) under HA_CONFIG_PATH, recurses with Path.rglob('*'), and returns config-root-relative paths for files whose extension is in .yaml/.yml/.json/.txt, skipping secrets.yaml and .storage/.

Use when: discovering which config files exist before reading or writing one. Not for: reading a file's content once you have its path — use files_read_config_file. Returns: list[str] of config-root-relative file paths. Limits: output can be large for the /config root; a subdirectory that resolves (after following symlinks) outside /config returns an empty list instead of listing files outside the config directory.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
subdirectoryNoSubdirectory relative to the HA config root to list, e.g. 'packages'. Omit (default '') to list from the config root.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.25.1
    • addedInput schema / properties / subdirectory / description
      Added value: +"Subdirectory relative to the HA config root to list, e.g. 'packages'. Omit (default '') to list from the config root."
  2. First observedv0.3.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/destructive=false, but the description adds substantial context beyond them: extension filtering, the secrets.yaml and .storage/ skips, output size risk on the root, and symlink-escape behavior (empty list instead of listing outside /config). These are real operational traits, not restated hints.

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 core behavior, then labeled Use when / Not for / Returns / Limits sections. Every line carries distinct information with no filler or redundancy.

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?

Even though an output schema exists, the description still documents the return shape (list[str] of config-root-relative paths) in prose. Combined with coverage of filtering, exclusions, and limits, an agent has everything needed to call and interpret it.

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 baseline is 3; however the description adds meaning beyond the schema by explaining how subdirectory is resolved under HA_CONFIG_PATH (symlink following, empty-list fallback when it escapes /config) and confirming the config-root default. That is genuine semantic value over the schema's field description.

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 (recursively list config files) plus precise scope: allowed extensions (.yaml/.yml/.json/.txt), explicit exclusions (secrets.yaml, .storage/), and root-relative output. An agent can distinguish it from files_read_config_file 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?

Explicit 'Use when' (discovering which config files exist before reading/writing) and 'Not for' routing the agent to the named alternative files_read_config_file with the precise condition that selects it. Nothing 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