Skip to main content
Glama

state_add

Adds a status block that displays text, icon, and color for each state of a source value in the app, creating a placeholder input when needed.

Instructions

Adds a status block that shows its own text, icon and colour per state in the app, and wires 'source' to I1 (placeholder created if needed). states: [{"wert": 1, "text": "Sunny", "symbol": "sun", "farbe": "#ffc800"}, ...]. compare='gleich': state applies if I1 equals wert; compare='ab': I1 >= wert, checked top to bottom (largest threshold first). Text may contain or <v1.1> (value of I1). default_* applies if no state matches. Room/category default to those of 'source'.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "page": "<page>",
      "title": "<title>",
      "source": "<source>",
      "states": "<states>"
    },
    "name": "state_add"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageYes
roomNo
visuNo
titleYes
sourceYes
statesYes
compareNogleich
categoryNo
default_iconNo
default_textNo
default_colorNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.9.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full load and does disclose key side effects: it wires 'source' to I1 and creates a placeholder if needed, and it explains that 'ab' thresholds are evaluated top to bottom with the largest first. It does not cover permissions, reversibility, or what the call returns.

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?

Dense and mostly front-loaded: purpose first, then an inline example, then comparison and default semantics. The semicolon-chained clauses are tight, though the run-on sentence makes it slightly harder to scan than it needs to be.

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

Completeness4/5

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

For an 11-parameter, no-annotation, no-output-schema mutation tool, the description covers the non-obvious semantics that would otherwise cause misuse. The remaining gaps (page, title, visu, and return behavior) are either largely self-evident or minor.

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 coverage is 0%, so the description must compensate, and it does for the hard parts: it spells out the states element shape (wert/text/symbol/farbe), the two compare modes and their matching semantics, the <v1> / <v1.1> text templating, the default_* fallback, and that room/category inherit from 'source'. Page, title, and visu remain unexplained.

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 names a specific verb and resource — it adds a status block that renders per-state text, icon and colour, and wires 'source' to I1. That is concrete enough to distinguish it from generic siblings like block_add, though it never names an alternative directly.

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?

There is no explicit when-to-use/when-not guidance or routing to sibling tools. What guidance exists is parameter-level: what compare='gleich' vs compare='ab' select, and that default_* kicks in when no state matches — useful, but about configuration rather than tool selection.

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