Skip to main content
Glama

add_variable

Add a global variable to a target in mBlock projects for sprites, mBot, CyberPi, or Arduino. Set name, initial value, and path to enable live block editing.

Instructions

Add a global variable to a target.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
pathNo
valueNo
targetNo
confirmNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

C2.4/5.0
Behavior2/5

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

The description only states the basic action. It does not disclose whether an existing variable is overwritten, whether confirm is required, whether the operation is reversible, or what side effects may occur. The annotations indicate mutation, but the description adds little beyond that.

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

Conciseness3/5

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

The description is a single, front-loaded sentence with no filler. However, it is so sparse that it is more under-specified than genuinely concise, providing only the bare minimum.

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?

With five parameters, no output schema, and no parameter documentation, the description is not sufficient for an agent to reliably call this tool. It does not clarify what a valid target is, how value/path interact, or what confirm does.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description provides no explanation of name, path, value, target, or confirm. Since the description must compensate for the missing schema descriptions but does not, parameter semantics are effectively unaddressed.

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 ('Add'), a resource ('global variable'), and a destination ('a target'). This is clear enough to understand the core action, though it does not explicitly differentiate from sibling tools like app_set_var or add_script.

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?

There is no guidance on when to use this tool versus alternatives, nor any mention of prerequisites, exclusions, or conditions under which it should not be used. Given many sibling tools, this is a noticeable gap.

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