Skip to main content
Glama

themes_create_theme

Create a new Home Assistant theme with custom CSS variables, supporting light and dark modes. Optionally overwrite existing themes.

Instructions

Create a new theme file at themes/<name>.yaml with the given CSS variables.

The HA frontend stores themes as a dict keyed by theme name. Standard variables include primary-color, accent-color, text-primary-color, etc. For dark/light variants use modes: {"name": {"modes": {"light": {...}, "dark": {...}}}}.

Set overwrite=True to replace an existing theme. By default reload_themes is called.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
variablesYes
overwriteNo
reloadNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

No annotations are provided, so the description must cover behavior. It explains internal storage and default reload behavior, but lacks clarity on what happens if overwrite is false and the theme already exists (e.g., error or override).

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?

The description is concise with 4 sentences, front-loaded with the main action. Each sentence adds value without redundancy, and the structure guides the reader from purpose to details.

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?

Given the complexity (4 parameters, nested objects, output schema present), the description covers creation, parameters, and common usage patterns. It does not describe the output, but the presence of an output schema mitigates this. A brief note on failure cases would improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0% description coverage, so the description adds essential meaning: it explains 'variables' as CSS variables with examples, 'modes' for dark/light variants, and the purpose of 'overwrite' and 'reload'. This far exceeds what the schema alone provides.

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 ('Create a new theme file') and resource ('themes/<name>.yaml' with CSS variables). It distinguishes itself from sibling theme tools (e.g., update, delete) through its focus on creation.

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?

The description explains when to use parameters like 'overwrite' and 'reload', and implies context for creating new themes. However, it does not explicitly mention when not to use this tool versus alternatives like 'update_theme' or possible error conditions.

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