Skip to main content
Glama

entities_set_value

Set the value of Home Assistant entities, including input_number, number, or climate temperature targets.

Instructions

Set value of input_number, number, or climate temperature.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entity_idYes
valueYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Handler for the entities_set_value tool. Sets a numeric value on input_number, number, or climate entities by calling the appropriate HA service.
    @mcp.tool()
    def set_value(entity_id: str, value: float) -> list[dict]:
        """Set value of input_number, number, or climate temperature."""
        domain = entity_id.split(".")[0]
        if domain == "input_number":
            return ha.call_service("input_number", "set_value", {"entity_id": entity_id, "value": value})
        if domain == "number":
            return ha.call_service("number", "set_value", {"entity_id": entity_id, "value": value})
        if domain == "climate":
            return ha.call_service("climate", "set_temperature", {"entity_id": entity_id, "temperature": value})
        raise ValueError(f"set_value not supported for domain: {domain}")
  • Registration via @mcp.tool() decorator on the set_value function (line 57). The tool name is derived from the function name set_value.
    @mcp.tool()
Behavior2/5

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

Without annotations, the description only says 'Set value', implying a mutation. It fails to disclose any behavioral traits like auth needs, side effects, or validation rules. No information about what happens if the entity type is incompatible or the value is out of range.

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

Conciseness4/5

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

The description is a single sentence that is direct and to the point. It could benefit from slight expansion for clarity, but it avoids verbosity and is well-structured.

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

Completeness2/5

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

Given the tool sets values for three distinct entity types with potential constraints (input_number min/max, climate temperature range), the description is insufficient. The output schema exists but is not mentioned, and no return value or error conditions are described.

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?

The description adds some meaning beyond the schema by clarifying that 'value' is a numeric parameter and 'entity_id' identifies the entity. However, it does not specify units for climate temperature or valid ranges for input_number, leaving gaps given 0% schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states it sets the value of three specific entity types: input_number, number, and climate temperature. This gives a specific action and resource, though it does not explicitly differentiate from sibling tools like helpers_set_input_number.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives, such as helpers_set_input_number for input_number helpers or services_set_climate_mode for climate temperature. The description lacks context about prerequisites or preferred scenarios.

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