Skip to main content
Glama
homeassistant-ai

Home Assistant MCP Server

Official

Get Integration

ha_get_integration
Read-onlyIdempotent

Retrieve Home Assistant integration config entries with pagination, filtering, and optional diagnostics. Get details by entry ID or list all integrations.

Instructions

Get integration (config entry) information with pagination.

Without an entry_id: Lists all configured integrations with optional filters. With an entry_id: Returns detailed information including full options/configuration.

EXAMPLES:

  • List all integrations: ha_get_integration()

  • Paginate: ha_get_integration(offset=50)

  • Search: ha_get_integration(query="zigbee")

  • Get specific entry: ha_get_integration(entry_id="abc123")

  • Get entry with editable fields: ha_get_integration(entry_id="abc123", include_schema=True)

  • Get entry with diagnostics dump: ha_get_integration(entry_id="abc123", include_diagnostics=True)

  • Get device-scoped diagnostics: ha_get_integration(entry_id="abc123", include_diagnostics=True, device_id="dev123")

  • Get the parsed KNX ETS project (group-address table): ha_get_integration(entry_id="", include_knx_project=True)

  • Walk a sub-tree: ha_get_integration(entry_id="abc123", include_diagnostics=True, diagnostics_data_path="")

  • Paginate a large list: ha_get_integration(entry_id="abc123", include_diagnostics=True, diagnostics_data_path="", diagnostics_data_limit=10, diagnostics_data_offset=20)

  • List config subentries: ha_get_integration(entry_id="abc123", include_subentries=True)

  • Inspect subentry create schema: ha_get_integration(entry_id="abc123", include_subentry_schema=True, subentry_type="conversation")

  • Inspect subentry reconfigure schema: ha_get_integration(entry_id="abc123", include_subentry_schema=True, subentry_type="conversation", subentry_id="sub123")

  • List template entries: ha_get_integration(domain="template")

STATES: 'loaded', 'setup_error', 'setup_retry', 'not_loaded', 'failed_unload', 'migration_error'.

OPTIONS: options reflect the entry's persisted values; a field that was never set may be absent (rather than shown at its schema default). Values that match a secrets.yaml entry are returned as "**redacted**". Use include_schema=True to see every editable field and its default/type. Nested option sections (e.g. a template helper's advanced_options) are additively flattened one level — each section's leaf keys are copied to the top of options (mirroring the OptionsFlow-derived read) while the raw nested section is preserved for fidelity, and an existing top-level key is never overwritten.

Each entry carries:

  • log_level: the canonical Python logger level name (DEBUG/INFO/WARNING/ERROR/CRITICAL) when the integration has a logger.set_level override, or "DEFAULT" (uppercase sentinel) when no override is set.

  • log_level_raw: the original numeric level (e.g. 10 for DEBUG) when HA returned an int, None otherwise (no override set, or HA provided a level name as a string).

This is distinct from the add-on side, where ha_get_addon returns Supervisor's lowercase "default" literal — do not cross-compare.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax entries to return per page in list mode (default: 50)
queryNoWhen listing, search by domain or title. Uses exact substring matching by default; set exact_match=False for fuzzy.
domainNoFilter by integration domain (e.g. 'template', 'group'). When set, includes the full options/configuration for each entry.
offsetNoNumber of entries to skip for pagination (default: 0)
entry_idNoConfig entry ID to get details for. If omitted, lists all integrations.
device_idNoOptional. When set with include_diagnostics=True, returns the device-scoped diagnostics dump for that specific device under the integration (rather than the full integration dump). Some integrations only expose config-entry-level dumps; others expose both.
exact_matchNoUse exact substring matching for query filter (default: True). Set to False for fuzzy matching when the query may contain typos.
subentry_idNoExisting subentry ID used with include_subentry_schema=True to inspect a reconfigure flow.
subentry_typeNoIntegration-defined subentry type used with include_subentry_schema=True.
include_schemaNoWhen entry_id is set, also return the options flow schema (available fields and their types). Use before ha_config_set_helper to understand what can be updated. Only applies when supports_options=true.
include_optionsNoInclude the options object for each entry. Automatically enabled when domain filter is set. For UI-created flow-based helpers (template, group, utility_meter, derivative, ...), the current config — template body, group members, source entity, etc. — is surfaced here by probing the options flow. Prefer this over include_schema when you only need to read the current values; use include_schema when you also need the field types or selector metadata.
diagnostics_fieldsNoOptional list of top-level keys to keep from the diagnostics data payload (e.g. ['home_assistant', 'issues']). Trims the payload before it hits the LLM context budget. Accepts a JSON list or comma-separated string. Only applies when include_diagnostics=True and the data payload is a dict. Unknown keys are silently dropped and surfaced via the omitted_fields sub-key.
include_subentriesNoWhen entry_id is set, include config subentries for the integration entry. Useful for integrations that expose conversation agents, devices, or other extension points as subentries.
include_diagnosticsNoWhen entry_id is set, also fetch the integration's diagnostics dump — integration-defined JSON (commonly includes redacted config, device list, state snapshots; exact top-level keys vary by integration). The canonical artifact users grab via Settings → Devices & Services → [integration] → ⋯ → Download diagnostics. Use when triaging integration bugs or filing ha_report_issue for a specific integration. Payloads can be large (Hue ~290 KB, ZHA/MQTT/ESPHome several MB) — pair with diagnostics_fields or diagnostics_truncate_at_bytes to fit the LLM context budget.
include_knx_projectNoWhen entry_id is a KNX config entry, also return the parsed ETS project: the full group-address table (address, name, DPT, description) under knx_project.group_addresses, plus the group-range hierarchy and project metadata. This is the parsed-project GA table that is NOT in the diagnostics dump; per-entity GA assignments are already covered by include_diagnostics (config_store / configuration_yaml). Ignored (with a warning) when the entry is not a KNX integration. The KNX integration exposes a single project, so the result is the same regardless of which KNX entry_id is used.
diagnostics_data_pathNoOptional dotted path into the diagnostics data sub-tree (e.g. '<list-valued path>' for per-device records, 'home_assistant.version' for HA core version; the exact key path varies by integration version). Walks into the post-fields payload. Resolution failures replace data with null and surface data_path_error. Use this when the interesting payload lives several levels deep — top-level diagnostics_fields can't address sub-trees on integrations where the bulk lives under one key (ZHA, MQTT, ESPHome). Only applies when include_diagnostics=True.
show_advanced_optionsNoWhen include_subentry_schema=True, ask older Home Assistant versions to expose advanced flow options. No-op on HA 2026.6+; pending removal before HA 2027.6.
diagnostics_data_limitNoPagination window size for list-valued diagnostics_data_path results. When set with a list-resolved path, swaps data for a pagination envelope {path, items, offset, limit, total, has_more}. Default None returns the full resolved value. Workflow: probe with a list-valued diagnostics_data_path and diagnostics_data_limit=10 to walk a large list one page at a time (the exact path varies by integration version). Only applies when include_diagnostics=True.
diagnostics_data_offsetNoPagination start index (default 0) for list-valued diagnostics_data_path results. Ignored when diagnostics_data_path is unset, diagnostics_data_limit is unset, or the resolved value is not a list. Only applies when include_diagnostics=True.
include_subentry_schemaNoWhen entry_id is set, return introspection-only config subentry schema information; no subentry is created. Pair with subentry_type, and optionally subentry_id for reconfigure schema.
diagnostics_truncate_at_bytesNoOptional byte cap on the serialized diagnostics payload (after diagnostics_fields and diagnostics_data_path have been applied). On hit, drops data and emits truncated=true, bytes_total, byte_cap, plus available_fields (when the capped value is a dict). Recommended starting point: 20000 bytes. Only applies when include_diagnostics=True.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Annotations already indicate readOnlyHint=true and idempotentHint=true. The description adds significant behavioral context: states the possible states, options behavior (redacted secrets, flattening of nested sections), log_level vs log_level_raw, and behavior of parameters like include_schema and include_diagnostics. No contradiction.

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 sections, examples, and bullet points. It is front-loaded with the main purpose. A slight reduction in verbosity could improve conciseness, but the complexity 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?

Given the tool's complexity (21 parameters, many optional) and presence of an output schema, the description covers all essential aspects: listing vs detail, pagination, options behavior, subentries, diagnostics, KNX project, and parameter interactions. No gaps observed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but the description adds substantial value beyond schema descriptions: examples of usage, distinction between include_options and include_schema, details on diagnostics_fields and diagnostics_data_path truncation, and KNX project specifics.

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 'Get integration (config entry) information with pagination.' and contrasts list mode vs detail mode. It distinguishes from siblings like ha_set_integration and ha_get_addon via detailed examples and log_level format notes.

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?

Provides explicit guidance on when to use each mode (without entry_id for list, with entry_id for details) and includes pagination, filtering, and parameter combinations. Lacks explicit 'do not use' statements, but the context is clear enough.

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