Skip to main content
Glama

Create a variable or set its starting value

set_variable

Declare a project-wide variable with a starting value; variables are also created automatically when first mentioned in a script.

Instructions

Declares a project-wide variable with a starting value. Variables are also created automatically the first time a script mentions them.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
valueNoStarting value, default 0

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior2/5

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

With no annotations provided, the description must carry the full behavioral disclosure burden. It mentions that variables are also created automatically, which is useful, but it does not clarify key behaviors such as whether setting an existing variable overwrites it, errors, or is idempotent, nor does it mention any naming constraints or side effects. For a mutation tool, this is a significant gap in transparency.

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 two concise sentences with no filler. The primary purpose is front-loaded, and the additional behavioral note about automatic creation is placed naturally without disrupting clarity. Every word earns its place.

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?

For a simple setter tool, the description is thin on operational context. It omits crucial details such as behavior on duplicate variable names, whether the variable can be modified later, and any constraints on the name or value types. Since there is no output schema or annotations to fill these gaps, the description is not complete enough for an agent to invoke the tool confidently in all scenarios.

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

Parameters2/5

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

The schema provides descriptions only for 'value' (starting value, default 0) but not for 'name'. The tool description does not add meaningful information about the 'name' parameter beyond implying it is the variable name, and it repeats the 'starting value' concept already in the schema. With only 50% schema coverage, the description fails to compensate for the undocumented 'name' parameter, leaving its semantics underspecified.

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 the tool's function: declaring a project-wide variable with a starting value. It also adds the distinctive behavioral note about automatic creation, which helps distinguish it from any sibling that might manage variables. The verb 'Declares' and resource 'project-wide variable' are specific and unambiguous.

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 that this tool is for pre-declaring a variable with a starting value, and that variables are otherwise created automatically. However, it does not explicitly state when to use this tool versus relying on automatic creation, nor does it mention any alternative tools. The guidance is inferred rather than stated, so it's adequate but not explicit.

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