Skip to main content
Glama

Get energy dashboard preferences

energy_get_energy_prefs
Read-onlyIdempotent

Retrieve current Home Assistant Energy Dashboard preferences, including energy sources and device consumption, to inspect before editing or saving changes.

Instructions

Return the full HA Energy Dashboard preferences.

Calls the WebSocket endpoint energy/get_prefs and returns its payload unchanged, including the configured energy_sources and device_consumption lists.

Use when: you need the current preferences before editing them with energy_save_energy_prefs or one of the energy_add_*/ energy_remove_energy_source helpers. Not for: adding or removing a single source without hand-building the full list — use energy_add_grid_consumption, energy_add_grid_return, energy_add_solar_source, energy_add_battery_source or energy_remove_energy_source instead. Returns: dict with energy_sources (list) and device_consumption (list), exactly as HA stores them. Errors: {"error": "..."} when the WebSocket call raises.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is clear. The description adds the underlying WebSocket endpoint (`energy/get_prefs`) and an error shape (`{"error": "..."}`), which is useful behavioral context beyond the annotations. It does not cover auth/rate limits, but those are minor for a local read-only getter.

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?

The description is structurally front-loaded with clear labels ('Use when:', 'Not for:', 'Returns:', 'Errors:') and every section is relevant. The 'Returns' line is somewhat redundant given an output schema exists, keeping this from a full 5.

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 getter with rich annotations and an output schema, the description covers purpose, usage context, explicit alternatives, and error behavior. Nothing critical an agent needs to select or invoke it correctly is missing.

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?

The tool takes zero parameters, so there are no parameter semantics to document. Baseline 4 applies; the description correctly does not invent parameter details.

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 ('Return the full HA Energy Dashboard preferences') and explicitly contrasts with sibling tools like `energy_save_energy_prefs` and the `energy_add_*` helpers. An agent can immediately tell this is the read-only getter for the full energy prefs.

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?

Provides explicit 'Use when' guidance (before editing via save or add/remove helpers) and a 'Not for' section that routes single-source additions/removals to the correct alternative tools. No inference required.

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