Skip to main content
Glama
Vortitron

home-assistant-mcp

by Vortitron

Give a user a username and password

ha_set_user_credentials
Destructive

Attach a local username and password to an existing Home Assistant user without a login. Fails if the username is taken or the user already has credentials.

Instructions

Create a local username/password login and attach it to an existing user that has none yet (use ha_create_user first). Fails if that username is already taken, or the user already has a login (use ha_change_user_password instead).

This mints a standing Home Assistant login independent of any VomeHome API key — revoking the key that called this does not revoke the login. Only do this for an account the home's owner actually wants to exist. Requires ha:config.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
user_idYesUser id from ha_list_users or ha_create_user.
passwordYesLogin password, chosen by the caller.
usernameYesLogin username.
instance_idNoOptional: the instance you mean (as listed by vomehome_list_instances). When given, the call is refused if this session is targeting a different home, instead of answering from it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.10.0

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the destructiveHint/openWorldHint annotations: it discloses both failure conditions (username taken, user already has a login) and a non-obvious security trait — that the minted login is a standing credential independent of the calling API key and survives key revocation. It also states the required ha:config permission.

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?

Front-loaded with the action and its routing alternative in the first sentence, then the security warning that warrants emphasis, then the permission requirement. No filler; every sentence carries decision-relevant information.

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 destructive mutation tool, it covers prerequisites, failure modes, alternatives, security lifetime of the created credential, and auth requirements. No output schema exists and none is needed, so nothing an agent requires to call this safely is missing.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents user_id, username, password, and instance_id. The description adds only the implicit uniqueness constraint on username; otherwise it defers to the schema, so the baseline 3 is appropriate.

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?

States a specific verb and resource ('Create a local username/password login and attach it to an existing user') and immediately distinguishes it from siblings ha_create_user (prerequisite) and ha_change_user_password (for users that already have a login). An agent can route correctly without opening any schema.

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-to-use ('attach it to an existing user that has none yet'), when-not ('Fails if... the user already has a login (use ha_change_user_password instead)'), and a prerequisite ('use ha_create_user first'). It also adds a scoping constraint ('Only do this for an account the home's owner actually wants to exist').

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools