Skip to main content
Glama
adrighem

Domoticz MCP Server

by adrighem

Add user variable

add_user_variable

Create a new user variable in Domoticz by specifying its name, type, and initial value. Supports integer, float, string, date, and time types.

Instructions

Add var. vtype: 0=Int, 1=Float, 2=Str, 3=Date, 4=Time. Cross-ref: domoticz://user-variables.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesNew user variable name
valueYesInitial user variable value
vtypeYesVariable type: 0 integer, 1 float, 2 string, 3 date, 4 time

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleNoOptional Domoticz response title
statusYesStatus returned by Domoticz, normally OK

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.4.0
    • changedOutput schema / additionalProperties
      Previous value: -trueNew value: +false
  2. Changed14 schema fields changedv1.3.1
    • addedInput schema / properties / name / description
      Added value: +"New user variable name"
    • addedInput schema / properties / name / maxLength
      Added value: +200
    • addedInput schema / properties / name / minLength
      Added value: +1
    • addedInput schema / properties / value / description
      Added value: +"Initial user variable value"
    • addedInput schema / properties / value / maxLength
      Added value: +2000
    • addedInput schema / properties / vtype / description
      Added value: +"Variable type: 0 integer, 1 float, 2 string, 3 date, 4 time"
    • addedInput schema / properties / vtype / enum
      Added value: +[
      +  0,
      +  1,
      +  2,
      +  3,
      +  4
      +]
    • addedOutput schema / additionalProperties
      Added value: +true
    • addedOutput schema / description
      Added value: +"A successful Domoticz command response."
    • removedOutput schema / properties / result
      Removed value: -{
      -  "title": "Result",
      -  "type": "string"
      -}
    • addedOutput schema / properties / status
      Added value: +{
      +  "description": "Status returned by Domoticz, normally OK",
      +  "title": "Status",
      +  "type": "string"
      +}
    • addedOutput schema / properties / title
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Optional Domoticz response title",
      +  "title": "Title"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "result"
      -]New value: +[
      +  "status"
      +]
    • changedOutput schema / title
      Previous value: -"add_user_variableOutput"New value: +"DomoticzToolResult"
  3. First observedv1.1.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations indicate readOnlyHint=false, destructiveHint=false, idempotentHint=false, and openWorldHint=trueikuha. The description does not explicitly state that this tool creates a new variable (which is a write operation), but the verb 'Add' implies mutation . It does not add context beyond the annotations, such as potential side effects or authentication needs. Since annotations already cover the safety profile (non-destructive, not read-only), the description adds some value but not rich behavioral context. No contradiction with annotations is present.

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 very short and to the point, with the core action stated first. It includes the vtype mapping which is useful. It is not overloaded with unnecessary content, but it could have added a bit more context on usage without harming conciseness.

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 simplicity of the tool (3 parameters, no nested objects, all required) and the existence of an output schema, the description is adequate for basic usage. However, it lacks any mention of potential error conditions, naming constraints (though schema specifies min/max length), or behavioral notes like whether the variable will be overwritten if the name exists. The annotations cover safety, and the schema covers parameters, so the description is sufficient but not comprehensive.

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%, meaning the schema documents all three parameters (name, value, vtype) with descriptions. The description adds the vtype mapping (0-4) which is redundant with the schema's enum description, but it does provide the parameter list in a compact form. The description does not add significant meaning beyond what the schema already provides, so the baseline of 3 is appropriate.

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?

The description states the verb 'Add' and the resource 'user variable', making the core purpose clear. It does not explicitly differentiate from sibling tools like update_user_variable or delete_user_variable, but the resource type is distinct enough that an agent can infer the operation. The description is concise but could be more explicit about the specific action compared to alternatives.

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

Usage Guidelines3/5

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

The description implies the tool is for creating new user variables, which is clear from the name and description. It does not provide explicit when-to-use guidance or mention alternatives (e.g., update_user_variable for existing variables), but the context of sibling tools and the schema (required name, vtype, value) makes the usage reasonably inferable. It lacks explicit exclusions or conditions, so it is adequate but not strong.

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