Skip to main content
Glama

themes_list_theme_files

List YAML theme files on disk to find themes that exist but are not yet loaded into Home Assistant.

Instructions

List YAML files under themes/. Useful when a theme exists on disk but isn't loaded yet.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The tool handler function 'list_theme_files' is decorated with @mcp.tool() and lists YAML files under the themes/ directory on disk. It returns relative paths to files matching .yaml or .yml extensions.
    @mcp.tool()
    def list_theme_files() -> list[str]:
        """List YAML files under `themes/`. Useful when a theme exists on disk but isn't loaded yet."""
        if not _THEMES_DIR.exists():
            return []
        return [
            str(p.relative_to(_CONFIG_PATH))
            for p in _THEMES_DIR.rglob("*")
            if p.is_file() and p.suffix in {".yaml", ".yml"}
        ]
  • server.py:57-57 (registration)
    The themes MCP server is mounted under the 'themes' namespace, meaning the tool is accessible as 'themes_list_theme_files' via the MCP protocol.
    mcp.mount(themes_mcp, namespace="themes")
  • server.py:30-30 (registration)
    The themes_mcp FastMCP instance is imported from tools.themes, which contains the @mcp.tool() registered functions.
    from tools.themes import mcp as themes_mcp
Behavior4/5

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

No annotations exist, but the description accurately describes the read-only operation and the specific path. It does not detail recursion depth or file extensions, but given simplicity, it is sufficient.

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 short sentences, zero filler. Every word adds value.

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 zero-parameter tool with an output schema, the description fully explains purpose and use case, making it complete for agent decision-making.

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?

No parameters exist (baseline 4); description adds no parameter info, but none is needed.

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?

The description clearly states the action ('list YAML files') and the resource ('under themes/'), and distinguishes from sibling tools like themes_list_themes by specifying it lists files on disk, not loaded themes.

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?

Explicitly provides a usage scenario ('useful when a theme exists on disk but isn't loaded yet'), guiding the agent when to use this tool versus alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Fistacho/ha-nexus-agent'

If you have feedback or need assistance with the MCP directory API, please join our Discord server