Skip to main content
Glama
homeassistant-ai

Home Assistant MCP Server

Official

Set Integration

ha_set_integration
Destructive

Enable, disable, add, or update a Home Assistant integration's options and config entries via config flows.

Instructions

Manage an integration (config entry): enable/disable, add, or update options.

Modes (pick one):

  • Enable/disable: entry_id + enabled.

  • Add integration: domain (+ config) — drives the domain's config flow, including menus and multi-step forms.

  • Update options: entry_id + config — drives the entry's options flow (what the "Configure" button does in the HA UI).

WHEN NOT TO USE:

  • Helpers (template, group, utility_meter, ...): use ha_config_set_helper.

  • Config subentries: use ha_config_set_helper(helper_type='config_subentry').

  • Removing an entry: use ha_remove_helpers_integrations.

Use ha_get_integration() to find entry IDs, and ha_get_integration(entry_id=..., include_schema=True) to inspect the options fields before an update.

Caveats: adding an integration runs its config flow exactly as the HA UI would (may pair devices, scan the network, create entities). Flows requiring a browser step (OAuth) or an asynchronous provider step error out at that step with a structured error instead of completing.

EXAMPLES:

  • Disable: ha_set_integration(entry_id="abc123", enabled=False)

  • Add: ha_set_integration(domain="workday", config={"name": "Workday"})

  • Update options: ha_set_integration(entry_id="abc123", config={"scan_interval": 30})

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
configNoFlow form data. With 'domain': input for the new integration's config flow. With 'entry_id' alone: input for the entry's options flow (updates its options). Multi-step flows consume keys per step; menu steps take 'next_step_id'. The step's data_schema is returned on validation errors so field names can be corrected.
domainNoIntegration domain to add (e.g. 'workday', 'local_calendar') — starts and drives that domain's config flow. Pass the flow's form fields in 'config'.
enabledNoTrue to enable, False to disable the entry. Requires entry_id; mutually exclusive with 'domain' and 'config'.
entry_idNoConfig entry ID of an existing integration (enable/disable and options-update modes). Omit when adding via 'domain'.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Annotations include destructiveHint: true; description adds caveats about config flow side effects (device pairing, scanning, entity creation) and error conditions for OAuth/async steps, exceeding annotation requirements.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with sections for purpose, modes, when-not-to-use, caveats, and examples; every sentence is informative with no redundancy.

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 (multiple modes, UI-like flows), the description covers all critical aspects: mode selection, parameter combinations, caveats, and references to related tools.

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% with detailed descriptions, but the description further explains parameter roles across modes, multi-step flows, and provides examples, adding value beyond schema.

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?

Description clearly states the tool manages integrations with three specific modes (enable/disable, add, update options) and distinguishes from sibling tools like ha_remove_helpers_integrations and ha_config_set_helper.

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?

Explicit 'WHEN NOT TO USE' section lists alternatives for helpers, config subentries, and removal, and advises using ha_get_integration to prepare for operations.

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