Skip to main content
Glama

Set active theme

themes_set_active_theme
Idempotent

Switch the Lovelace frontend to a registered theme, optionally pinning light or dark mode. Use it to control which theme the Home Assistant interface displays.

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: {"service": "frontend.set_theme", "changed_states": [...]} — the states HA reports as changed by the call. Limits: mode values other than 'light'/'dark' are dropped rather than rejected.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "themes_set_active_theme"
  }
}

Input 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

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/5.0
Behavior4/5

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

Annotations already declare readOnly=false, idempotent=true, destructive=false, so the safety profile is covered. The description adds genuine behavioral detail beyond that: the exact service invoked, the fact that non-light/dark mode values are silently dropped rather than rejected, and the shape of the reported changed states.

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

Conciseness3/5

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

The service-call detail is well front-loaded, but the silent-drop rule for `mode` is repeated three times (opening paragraph, 'Use when', and 'Limits'). The 'Returns' block also duplicates the existing output schema, so some trimming would tighten the definition.

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?

For a two-parameter, non-destructive setter with full schema coverage and an output schema, this covers everything an agent needs: what it does, when to use it, and the one surprising edge case. The repetition is the only real slack.

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 baseline is 3. The description's notes on `mode` (only passed when 'light'/'dark', otherwise omitted) largely restate what the schema already says ("any other value is ignored"), adding little new semantic content.

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?

Names a specific verb and resource ("Set the active Lovelace frontend theme") and even identifies the underlying service (`frontend.set_theme`). An agent can immediately distinguish this from themes_create_theme or themes_update_theme, which operate on theme definitions rather than the active selection.

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 a clear selection context. It stops short of explicit exclusions (e.g. 'use themes_update_theme to modify a theme's contents'), so the agent must infer alternatives from sibling names alone.

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