Skip to main content
Glama
tim661811
by tim661811

Create a Homey logic variable

homey_variable_create

Create a new logic variable to store values for Homey automations, enabling data persistence between runs and flow-to-flow value passing. Requires name, type, and starting value.

Instructions

Creates a new logic variable. Use this when an automation needs to remember something between runs, or to hand a value from one flow to another. A logic variable is the better choice over a tag published from a script whenever a person may want to see or change the value: logic variables appear in the Homey app, can be set by hand, and are readable here through homey_home_overview. Exactly three types exist: string, number and boolean. The type is fixed once created and the value must match it. It is created with the value given, so pick a starting value the house can live with: flows may read it immediately. Creating something the owner did not ask for clutters their Homey, so confirm is required.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesWhat it is called, as shown in the Homey app. Names are not unique, so check homey_home_overview first.
typeYesFixed at creation and cannot be changed afterwards.
valueYesThe starting value, matching the type.
confirmYesMust be true. Confirms the owner asked for a new variable on their Homey; do not set it on their behalf.
Install Server

TDQS

A4.7/5.0
Behavior4/5

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

Annotations indicate readOnlyHint=false, destructiveHint=false, but the description adds important behavioral context: the type is fixed permanently, the value must match the type, the variable is created with a starting value that may be read immediately, and creating something the owner didn't ask for clutters their Homey. It also discloses the confirm requirement. This goes beyond the annotations, though it doesn't explicitly mention reversibility or deletion, but the description is strong.

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 a single, well-structured paragraph that front-loads the core action and immediately provides usage context. Every sentence contributes: purpose, use case, comparison with alternative, type constraints, value guidance, and confirmation requirement. There is no filler or repetition of schema content.

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 tool's complexity (4 required params, 1 enum) and the complete schema coverage, the description covers all necessary aspects: purpose, usage, type semantics, value semantics, behavioral guidance on confirmation, and even interpersonal considerations (cluttering the owner's Homey). No output schema means return format isn't expected; the description is complete for a creation 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 description coverage is 100%, so all parameters are already described. The description adds extra meaning: it explains the starting value selection rationale ('pick a starting value the house can live with') and reinforces type constraints. It also adds context about name non-uniqueness by pointing to homey_home_overview, which complements the schema's note. While it doesn't delve into formatting, it adds value over the 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 purpose is clearly stated: 'Creates a new logic variable' with a specific verb and resource. It distinguishes itself from siblings by explaining the use case for logic variables versus tags, and it is distinct from homey_variable_set. The scope is explicitly bounded: only exactly three types exist, and the type is fixed once created.

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 states when to use it ('when an automation needs to remember something between runs, or to hand a value from one flow to another') and provides a clear comparison with an alternative ('a logic variable is the better choice over a tag published from a script'). It also advises against unnecessary creation and requires confirmation, which is guidance on when not to use it.

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

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/tim661811/homey-mcp'

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