Skip to main content
Glama

Delete theme file

themes_delete_theme
DestructiveIdempotent

Delete a theme YAML file from disk and optionally reload frontend themes. Use when a theme is no longer needed or must be removed from Home Assistant.

Instructions

Delete a theme file.

Removes themes/<name>.yaml from disk if it exists.

Use when: a theme is no longer needed. Returns: dict with success and deleted (the removed path), plus reloaded when reload=True. Errors: {"success": false, "error": "Theme '<name>' not found at <path>"} when the file doesn't exist; {"success": false, "error": "invalid_theme_name", "detail": ...} when name contains '/' or a backslash, starts with '.', or is blank.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesTheme name to delete; obtain it from themes_list_themes or themes_list_theme_files.
reloadNoIf true, calls frontend.reload_themes after deleting the file; defaults to true.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.25.1
    • addedInput schema / properties / name / description
      Added value: +"Theme name to delete; obtain it from themes_list_themes or themes_list_theme_files."
    • addedInput schema / properties / reload / description
      Added value: +"If true, calls frontend.reload_themes after deleting the file; defaults to true."
  2. Addedv0.4.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true, idempotentHint=true, and readOnlyHint=false. The description adds substantial context beyond these: exact file path affected, the behavior when the file is missing, what the reload flag does, and detailed error conditions including invalid theme name patterns. This is rich behavioral disclosure.

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 with the core action, then structured into 'Use when', 'Returns', and 'Errors' sections. Every sentence carries actionable information with no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is nearly complete for a destructive file deletion tool. It outlines return fields and error cases, though the presence of an output schema makes the explicit return description redundant. Error detail is valuable and not fully covered elsewhere. Minor gap: no mention of permissions or whether deletion is reversible.

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 description coverage is 100%, so both parameters are documented in the schema. The description adds validation semantics for `name` (it fails if the name contains '/', a backslash, starts with '.', or is blank) and clarifies that `reload` triggers frontend.reload_themes. This meaningfully augments the schema.

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 'Delete' and resource 'theme file', and clarifies the exact operation: removing `themes/<name>.yaml` from disk if it exists. An agent can distinguish this from themes_create_theme, themes_update_theme, and themes_list_themes without opening any 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?

Provides a clear when-to-use condition: 'a theme is no longer needed.' It does not name alternative tools or explicitly warn about destructive side effects beyond the annotation, but the usage context is clear and sufficient for a delete operation.

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