Skip to main content
Glama
homeassistant-ai

Home Assistant MCP Server

Official

Get Dashboard

ha_config_get_dashboard
Read-onlyIdempotent

Retrieve, list, or search Home Assistant Lovelace dashboard configurations: fetch full or single-view configs, list all dashboards, or locate cards by entity, type, or heading.

Instructions

Get dashboard info - list all dashboards, get config, or search for cards.

MODE 1 — List: list_only=True Lists every dashboard's metadata (url_path, title, icon), storage and YAML alike (metadata only — bodies are never included here).

MODE 2 — Search: any of entity_id / card_type / heading provided Finds cards, badges, and header cards matching the criteria, including cards nested inside stacks, grids, conditional cards, button-card custom_fields, and state-switch states. Each match carries a python_path and a jq_path that locate the card for nested as well as top-level cards. The python_path is a Python subscript chain to be appended after config — e.g. python_transform=f'config{m["python_path"]}["icon"] = "mdi:x"' (it is NOT valid on its own without the config prefix). jq_path is the same location in jq dot-notation. Multiple criteria are AND-ed. Always fetches fresh config, bypassing the cache. Search covers cards/card/custom_fields/states containers up to a depth bound; if the dashboard carries a non-traversed child-bearing shape (e.g. picture-elements elements), the result carries a warnings entry naming where, so its hidden content is not mistaken for absent. Strategy dashboards are not searchable (no explicit cards).

MODE 3 — Get: Active when list_only=False and no search parameters are provided. Returns the full Lovelace dashboard config, defaulting to the main dashboard if url_path is omitted. Pass view_path=<views[].path> to return ONLY that view: the response then carries view + view_index instead of config, keeping the payload small on multi-view dashboards. config_hash still covers the FULL config, so a follow-up ha_config_set_dashboard(python_transform=...) addressing config['views'][view_index] validates unchanged. An unknown view_path errors and lists the available view paths. include_screenshot=True also returns rendered image(s) of the dashboard (beta feature); when you only need the render and not the config, use the dedicated ha_get_dashboard_screenshot tool instead.

MODE 4 — Search all: mode="search" with query= Answers "which dashboards contain this entity/card" by walking every storage-mode dashboard's views/cards/sections for the query substring. Each match names the url_path, view, card_path, card_type, and the matched field/value. Takes precedence over the other modes (list_only / entity_id / card_type / heading are ignored when mode="search"). YAML-mode dashboards are never searched on either path — the component walk skips them in-process and the component-less legacy walk skips any row tagged mode="yaml" — because HA resolves !secret when loading a YAML Lovelace config, so searching one could surface resolved secrets. On installs without the ha_mcp_tools component, the default (unnamed) dashboard is also not searched — only dashboards with a url_path are.

Return a stable config_hash (Get and Search modes only; not present in list_only mode) across consecutive reads of an unchanged config — compute_config_hash documents the underlying contract.

EXAMPLES:

  • List all dashboards: ha_config_get_dashboard(list_only=True)

  • Get default dashboard: ha_config_get_dashboard(url_path="default")

  • Get custom dashboard: ha_config_get_dashboard(url_path="lovelace-mobile")

  • Get one view only: ha_config_get_dashboard(url_path="lovelace-mobile", view_path="office")

  • Force reload: ha_config_get_dashboard(url_path="lovelace-home", force_reload=True)

  • Find cards by entity: ha_config_get_dashboard(url_path="my-dash", entity_id="light.living_room")

  • Find by wildcard: ha_config_get_dashboard(url_path="my-dash", entity_id="sensor.temperature_*")

  • Find by type: ha_config_get_dashboard(url_path="my-dash", card_type="tile")

  • Find heading: ha_config_get_dashboard(url_path="my-dash", heading="Climate", card_type="heading")

SEARCH WORKFLOW EXAMPLE:

  1. find = ha_config_get_dashboard(url_path="my-dash", entity_id="light.bedroom")

  2. ha_config_set_dashboard( url_path="my-dash", config_hash=find["config_hash"], python_transform=f'config{find["matches"][0]["python_path"]}["icon"] = "mdi:lamp"' )

Note: YAML-mode dashboards (defined in configuration.yaml) are not included in list.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoSet to 'search' for a CROSS-dashboard search: which dashboards contain a given entity_id or text (requires query). Leave unset for the default list/get/single-dashboard-search behavior selected by list_only / entity_id / card_type / heading.
queryNoWith mode='search': the entity_id or substring to find across all storage-mode dashboards. Ignored otherwise.
headingNoFind cards by heading/title text (case-insensitive partial match). When provided, activates search mode.
url_pathNoDashboard URL path (e.g., 'lovelace-home'). Use 'default' for default dashboard. If omitted with list_only=True, lists all dashboards.
card_typeNoFind cards by type, e.g. 'tile', 'button', 'heading'. When provided, activates search mode.
entity_idNoFind cards by entity ID. Supports wildcards, e.g. 'sensor.temperature_*'. Matches cards with this entity in 'entity' or 'entities' field, view-level badges, and header cards. When provided, activates search mode (returns matches, not full config).
list_onlyNoIf True, list all dashboards instead of getting config. When True, url_path is ignored.
view_pathNoGet mode: return ONLY the view whose Lovelace views[].path matches (response carries 'view' + 'view_index' instead of the full 'config') — use this to keep multi-view dashboards from blowing up the response when you only need one view. Does not require any beta feature. With include_screenshot, also selects the view to render. Ignored in list/search mode. Omit for the full config.
force_reloadNoForce reload from storage (bypass cache). Not applicable in search mode, which always reads fresh config.
include_configNoIn search mode: include each matched card's own configuration object in results (increases output size). Note that a matched container card's config contains its descendants, which are themselves separate matches with their own config, so deeply-nested stacks multiply the payload — keep the default (False) unless you need the bodies. Does not affect whether the full dashboard config is returned — search mode always returns matches only, not the full dashboard. Config bodies are surfaced only for dashboards provably in storage mode; for a YAML or unconfirmed dashboard the bodies are withheld (they may carry resolved !secret values) and the response says so, with match locations still reported. Ignored outside search mode.
include_screenshotNoGet mode only: also return rendered image(s) of the dashboard for visual verification. Requires the 'dashboard screenshot' beta feature + engine add-on/sidecar. If the feature is disabled the config is returned with a warning; if the engine is configured but the render fails, the call errors (the screenshot is the requested payload). Ignored in list/search mode. When you already have the config and only need the render, use the dedicated ha_get_dashboard_screenshot tool (registered when the same beta feature is on) — it returns images without echoing the config.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv8.5.0
    • changedInput schema / properties / force_reload / description
      Previous value: -"Force reload from storage (bypass cache). Not applicable in search mode (search always uses force=True for fresh results)."New value: +"Force reload from storage (bypass cache). Not applicable in search mode, which always reads fresh config."
  2. Changed1 schema field changedv8.4.1
    • changedInput schema / properties / include_screenshot / description
      Previous value: -"Get mode only: also return rendered image(s) of the dashboard for visual verification. Requires the 'dashboard screenshot' beta feature + engine add-on/sidecar. If the feature is disabled the config is returned with a warning; if the engine is configured but the render fails, the call errors (the screenshot is the requested payload). Ignored in list/search mode."New value: +"Get mode only: also return rendered image(s) of the dashboard for visual verification. Requires the 'dashboard screenshot' beta feature + engine add-on/sidecar. If the feature is disabled the config is returned with a warning; if the engine is configured but the render fails, the call errors (the screenshot is the requested payload). Ignored in list/search mode. When you already have the config and only need the render, use the dedicated ha_get_dashboard_screenshot tool (registered when the same beta feature is on) — it returns images without echoing the config."
  3. First observedv7.14.2

TDQS

A4.8/5.0
Behavior5/5

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

Annotations declare readOnlyHint=true, openWorldHint=false, idempotentHint=true, so the safety profile is already covered. The description adds substantial behavioral context beyond that: cache-bypassing behavior in search mode, config_hash stability contract, warnings for non-traversed child-bearing shapes, secret-leak avoidance for YAML dashboards, and the view_path response shape change (view + view_index instead of config). It also discloses failure modes (unknown view_path errors and lists available paths; screenshot render failure errors).

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 long but well-structured with clear MODE headers, examples, and a workflow example. Every section earns its place given the tool's four-mode complexity. It is front-loaded with the core purpose and mode summary. Slight redundancy exists (e.g., YAML-mode exclusion appears twice, include_screenshot details appear in both the mode section and the parameter description), but the structure makes the length navigable.

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 an 11-parameter, 4-mode tool with no output schema, the description is remarkably complete. It covers activation conditions for every mode, return-shape differences, error behavior, cache semantics, security considerations (secrets), and the follow-up write workflow. The examples cover all major modes. Nothing an agent needs to select and invoke the correct mode 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?

Schema description coverage is 100%, so the baseline is 3. The description adds meaningful semantics beyond the schema: it explains mode interactions (mode='search' takes precedence and ignores list_only/entity_id/card_type/heading), the python_path/jq_path contract with the required `config` prefix, wildcard support, and the include_config payload-multiplication caveat. It doesn't add much per-parameter syntax beyond the schema, but the cross-parameter mode logic is genuinely valuable.

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 opens with a clear verb+resource ('Get dashboard info') and then enumerates four distinct modes (List, Search, Get, Search all) with explicit activation conditions. It distinguishes itself from siblings like ha_config_set_dashboard and ha_get_dashboard_screenshot by naming them and stating when to use them instead.

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?

The description explicitly states when each mode activates (e.g., 'MODE 1 — List: list_only=True', 'MODE 3 — Get: Active when list_only=False and no search parameters are provided'), and names alternatives: 'use the dedicated ha_get_dashboard_screenshot tool instead' and 'ha_config_set_dashboard(python_transform=...)' for follow-up writes. It also gives exclusions: YAML-mode dashboards are not included, strategy dashboards are not searchable.

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