Skip to main content
Glama

entities_bulk_set_state

Bulk write virtual states to multiple Home Assistant entities via the set_state API. Provide entity IDs, states, and optional attributes per update; returns results for each.

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
Behavior5/5

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

With no annotations provided, the description fully discloses behavioral traits: it writes to /api/states (virtual state), returns per-update results with error information, and is not for real device control. No contradictions.

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?

The description is concise at four sentences, each adding value. The first sentence states the core purpose, followed by parameter details, return type, and a crucial usage note. No redundant 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?

Given the low schema coverage, the description compensates fully by explaining the parameter structure and return format. No additional information is needed for proper tool invocation.

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?

The input schema has 0% description coverage, but the description explains that the 'updates' array must contain objects with 'entity_id' and 'state', plus optional 'attributes'. This adds necessary meaning beyond the bare 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?

The description clearly states 'Bulk-write states using HA's set_state API.' It specifies the action (bulk-write), resource (states), and API, making the purpose unambiguous. The required fields (entity_id, state) and optional attributes are listed, distinguishing it from siblings like entities_bulk_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?

The description explicitly notes that this tool sets virtual states and advises using bulk_control for real device control. This provides clear usage guidance and differentiates between the two tools, helping the agent choose correctly.

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