Skip to main content
Glama
adrighem

Domoticz MCP Server

by adrighem

set_temperature_setpoint

Set the temperature setpoint for a thermostat by entering a target Celsius value and device index or name.

Instructions

Set the temperature setpoint for a thermostat.

Args: setpoint: Target temperature in Celsius (e.g., 21.5). idx: Device index. name: Device name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
setpointYes
idxNo
nameNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The actual tool handler for set_temperature_setpoint. It is decorated with @mcp.tool(), resolves the device idx by name or direct idx, then calls the Domoticz API 'setsetpoint' command.
    @mcp.tool()
    async def set_temperature_setpoint(setpoint: float, idx: int | None = None, name: str | None = None) -> str:
        """Set the temperature setpoint for a thermostat.
        
        Args:
            setpoint: Target temperature in Celsius (e.g., 21.5).
            idx: Device index.
            name: Device name.
        """
        if idx is None and name is None:
            return '{"status": "error", "message": "Must provide either idx or name"}'
        async with create_client() as client:
            resolved_idx = await _resolve_device_idx(client, idx, name)
            if resolved_idx is None:
                return '{"status": "error", "message": "Device not found"}'
            response = await _do_request(client, "GET", f"{DOMOTICZ_API_URL}?type=command¶m=setsetpoint&idx={resolved_idx}&setpoint={setpoint}")
            return response.text
  • Registration of set_temperature_setpoint as an MCP tool via the @mcp.tool() decorator on the FastMCP instance.
    @mcp.tool()
  • Input parameters: setpoint (float, required), idx (optional int), name (optional str). The docstring documents setpoint as Celsius temperature target.
    async def set_temperature_setpoint(setpoint: float, idx: int | None = None, name: str | None = None) -> str:
        """Set the temperature setpoint for a thermostat.
        
        Args:
            setpoint: Target temperature in Celsius (e.g., 21.5).
            idx: Device index.
            name: Device name.
        """
  • Helper function used by set_temperature_setpoint to resolve a device name or idx to a numeric idx for the API call.
    async def _resolve_device_idx(client: "httpx.AsyncClient", idx: Optional[int] = None, name: Optional[str] = None) -> Optional[int]:
        """Resolve a device to its idx."""
        return await _resolve_idx(client, idx, name, _device_cache, f"{DOMOTICZ_API_URL}?type=command¶m=getdevices&filter=all&used=true")
Behavior2/5

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

No annotations are present, so the description must convey behavioral traits. It only states the action but fails to disclose side effects, permission requirements, setpoint range, or interaction with schedules. The description adds minimal behavioral context beyond the obvious write operation.

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 concise with no wasted words. The use of 'Args:' is a Python-style docstring that may not be optimal for an LLM, but it is structured and each line adds information. It is appropriately sized for the tool's simplicity.

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

Completeness3/5

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

Given the tool's simplicity (3 parameters, one required) and the existence of an output schema (not shown), the description provides the core functionality but lacks completeness on parameter relationships and error conditions. For example, it doesn't specify if both 'idx' and 'name' can be omitted or how they are used together.

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?

The input schema has 0% description coverage, but the description explains that 'setpoint' is in Celsius with an example (21.5), and describes 'idx' as device index and 'name' as device name. This adds significant meaning beyond the raw schema, though it could clarify how 'idx' and 'name' interact.

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 'Set the temperature setpoint for a thermostat,' specifying the verb ('Set'), resource ('temperature setpoint'), and device type ('thermostat'). This distinguishes it from sibling tools like 'set_dimmer_level' or 'set_color_temperature'.

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 is provided on when to use this tool versus alternatives. For example, it does not mention that the target device must be a thermostat, or that there are other methods to control temperature (e.g., through scenes). The description lacks context for appropriate invocation.

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/adrighem/domoticz-mcp'

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