Skip to main content
Glama

Set active theme

themes_set_active_theme
Idempotent

Switch the Home Assistant Lovelace frontend theme by calling frontend.set_theme with a registered theme name and optional light or dark mode.

Instructions

Set the active Lovelace frontend theme.

Calls service frontend.set_theme with name, and mode when it is 'light' or 'dark'; any other mode value is silently omitted from the call.

Use when: switching which theme the frontend displays. Returns: the raw result of the frontend.set_theme service call. Limits: mode values other than 'light'/'dark' are dropped rather than rejected.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoOptional 'light' or 'dark' to also pin the color mode; any other value is ignored; omit to leave the mode as-is.
nameNoRegistered theme name to activate, e.g. 'default' or a custom theme name; defaults to 'default'.default

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 / mode / description
      Added value: +"Optional 'light' or 'dark' to also pin the color mode; any other value is ignored; omit to leave the mode as-is."
    • addedInput schema / properties / name / description
      Added value: +"Registered theme name to activate, e.g. 'default' or a custom theme name; defaults to 'default'."
  2. Addedv0.4.0

TDQS

A4.1/5.0
Behavior4/5

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

Adds meaningful behavior beyond the annotations: it names the underlying service (frontend.set_theme) and discloses the non-obvious gotcha that invalid `mode` values are silently dropped rather than rejected, repeated in the Limits line. Annotations provide the safety profile (idempotent, non-destructive) but not this silent-failure nuance, so the description earns credit.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core purpose and organized into Use when / Returns / Limits, which is easy to scan. Some redundancy between the service-call sentence and the Limits line, but overall tight with no wasted prose.

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 an output schema exists, the Returns line is somewhat redundant, but the description is otherwise complete: it covers purpose, trigger, underlying call, the mode gotcha, and the raw-return nature. Nothing critical is missing for a two-parameter setter.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents both parameters including the 'any other value is ignored' behavior. The description largely restates this (mode only applied when 'light'/'dark'), so it does not add much beyond the schema; baseline 3 is appropriate.

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 and resource ('Set the active Lovelace frontend theme') that an agent can immediately distinguish from siblings like themes_create_theme, themes_update_theme, and themes_reload_themes. The purpose is unambiguous 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?

'Use when: switching which theme the frontend displays' gives clear triggering context. It does not, however, name any alternative or exclusion (e.g., how it differs from themes_list_themes or themes_create_theme), so routing between the many theme siblings still relies on the name.

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