Skip to main content
Glama
homeassistant-ai

Home Assistant MCP Server

Official

Get Dashboard

ha_config_get_dashboard
Read-onlyIdempotent

Retrieve Lovelace dashboard configurations, list all dashboards, or search for cards by entity, type, or heading across storage-mode dashboards.

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.

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.
Behavior5/5

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

Adds significant behavioral context beyond annotations: search always fetches fresh config, YAML dashboards excluded for security, config_hash stability, depth bounds with warnings, view_path returns only that view with view_index, error behavior for unknown view_path. No contradiction with readOnlyHint/idempotentHint annotations.

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?

Well-structured into modes with clear headings. Every sentence adds value, but the description is lengthy. Could be slightly more concise, but the complexity of four modes justifies the length.

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?

Completely covers all modes, return structures (list metadata, config, view, matches with paths, warnings), edge cases (YAML/strategy exclusion, unknown view_path error), and workflow example. No output schema, but description adequately documents return values.

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 has 100% coverage with descriptions, but the description adds meaning beyond the schema by explaining parameter interactions (e.g., mode takes precedence over list_only/search params, list_only ignores url_path, include_config only in search mode). Examples illustrate parameter usage.

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 clearly states the tool retrieves dashboard info from Home Assistant. It details four distinct modes (list, search, get, search all) with specific verbs and resources, and distinguishes it from sibling tools like ha_config_set_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?

Provides explicit guidance on when to use each mode (e.g., 'list_only=True to list all dashboards', 'search when entity_id/card_type/heading provided', 'get when no search params'). Includes examples, a workflow, and states when not to use (YAML/strategy dashboards not searchable).

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