Skip to main content
Glama
homeassistant-ai

Home Assistant MCP Server

Official

Set Integration

ha_set_integration
Destructive

Manage a Home Assistant integration: enable/disable it, add a new one via config flow, or update options via options flow.

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' — a string, or a list of successive selections for flows that present more than one menu (e.g. a menu revisited after each branch, ending in a finish option). 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 declare destructiveHint=true, and the description adds important behavioral context: adding an integration runs the full HA config flow and 'may pair devices, scan the network, create entities,' and flows requiring browser steps (OAuth) error out with a structured error. These caveats go well beyond the annotations.

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?

Despite being longer than most, the description is well-structured with clear headings (modes, when-not-to-use, caveats, examples) and a front-loaded one-sentence summary. Every section earns its place, and the length is justified by the tool's complexity.

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 and that an output schema exists, the description is complete: it covers all operation modes, exclusions, prerequisites, side effects, and failure cases. The agent has enough information to select and invoke the tool correctly without ambiguity.

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?

Input schema covers 100% of parameters with detailed descriptions, so baseline is 3. The description adds value by clearly explaining the three operating modes and how parameters combine (entry_id+enabled vs domain+config vs entry_id+config) and includes concrete examples. This goes slightly beyond what the schema already provides.

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 'Manage an integration (config entry): enable/disable, add, or update options,' which precisely states the verb, resource, and scope. It clearly distinguishes the tool from sibling tools by specifying what it is not for (helpers, config subentries, removal).

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 includes an explicit 'WHEN NOT TO USE' section that names concrete alternatives (ha_config_set_helper, ha_remove_helpers_integrations) and advises using ha_get_integration to find entry IDs and inspect schemas before updating, providing clear context and exclusions.

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