Skip to main content
Glama
homeassistant-ai

Home Assistant MCP Server

Official

Get Dashboard

ha_config_get_dashboard
Read-onlyIdempotent

List Home Assistant dashboards, retrieve Lovelace configs for a whole dashboard or a single view, and locate cards by entity, type, or heading with exact paths for targeted updates.

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 (force=True). 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 (search always uses force=True for fresh results).
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. Dates show when Glama detected each change.

  1. 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."
  2. 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 already declare readOnlyHint and idempotentHint; the description adds substantial non-obvious behavior on top: search 'Always fetches fresh config (force=True)', YAML dashboards are never searched because 'searching one could surface resolved secrets', config bodies are withheld for unconfirmed storage mode, unknown view_path errors and 'lists the available view paths', and non-traversed shapes produce a `warnings` entry so hidden content 'is not mistaken for absent'. This is far beyond what annotations convey.

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 the length is earned: 11 parameters and 4 modes make it genuinely complex. MODE headers, a leading summary sentence, and grouped EXAMPLES make navigation easy. Minor redundancy exists — the screenshot guidance appears in both MODE 3 and the include_screenshot parameter — so it is not maximally tight, but no sentence is wasted.

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 tool with no output schema and no required parameters, the description covers everything an agent needs: return shapes per mode (metadata vs matches with python_path/jq_path vs config vs view+view_index), config_hash stability contract, error conditions, security caveats, and cross-tool workflow. The only thing absent is a literal response schema, which is not the description's job in this exercise.

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 coverage is 100%, so baseline is 3, but the description adds real semantic value for parameters: mode precedence over list_only/entity_id/card_type/heading, view_path returning 'view' + 'view_index' while 'config_hash still covers the FULL config', include_config's descendant-multiplication caveat, and the python_path requiring a `config` prefix to be valid. These behaviors are not derivable from the schema alone.

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?

Opening sentence names a specific verb and resource ('Get dashboard info - list all dashboards, get config, or search for cards') and then enumerates four distinct modes with their activation conditions. The read-only purpose is immediately distinguishable from siblings like ha_config_set_dashboard and ha_config_delete_dashboard.

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 routes to alternatives: 'use the dedicated ha_get_dashboard_screenshot tool instead' when only a render is needed (stated twice), and the SEARCH WORKFLOW EXAMPLE shows chaining with ha_config_set_dashboard. It also gives precise mode-selection rules ('Takes precedence over the other modes', 'Active when list_only=False and no search parameters are provided') plus exclusions (YAML dashboards, strategy dashboards, default dashboard without the component).

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/homeassistant-ai/ha-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server