Skip to main content
Glama

entities_bulk_set_state

Bulk-set virtual states for multiple entities in Home Assistant using the set_state API, with per-item success or error status.

Instructions

Bulk-write states using HA's set_state API.

Each item must contain entity_id and state, plus optional attributes dict. Returns a list of per-update result dicts ({entity_id, ok, error?}). Note: this writes to /api/states which only sets a virtual state — for real device control use bulk_control instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
updatesYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Discloses that it writes to /api/states (virtual state only), and provides return format. Lacks mention of idempotency or overwrite behavior, but given no annotations, it does well. Could add permission notes.

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?

Four concise sentences: purpose, input format, return format, caveat. No filler. Front-loaded with key info. Every sentence is necessary.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers input format, return format, and the virtual vs real control distinction. Could mention partial failure handling, but the return format hints at it. Adequate for a simple bulk write tool.

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 only defines an array of arbitrary objects. The description adds critical meaning: each item must contain entity_id and state, plus optional attributes dict. This compensates for 0% schema description coverage.

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 it bulk-writes states using HA's set_state API. It specifies the input format (each item with entity_id, state, optional attributes) and return format. It also distinguishes itself from the sibling 'bulk_control' for real device control.

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 guidance: use this for virtual state writes, not for real device control. Directs to use 'bulk_control' instead for device control. No ambiguity about when to use this vs alternatives.

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/Fistacho/ha-nexus-agent'

If you have feedback or need assistance with the MCP directory API, please join our Discord server