Skip to main content
Glama

set_variable

Set or delete a global show variable with numeric or text values. Optionally prompt the operator for input to adjust on the fly.

Instructions

Set a global show variable (SetVar).

Args:
    var_name: Variable name (should start with $, e.g. "$song")
    value: Numeric, text, or None to delete the variable
    input_dialog: If True (string values only), prompt the operator with an
                  input dialog instead of setting a fixed value

Returns:
    str: Operation result message

Examples:
    - Set $count to 5
    - Set $song to "Opening"
    - Delete $count (value=None)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
var_nameYes
valueNo
input_dialogNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses that variables are global, can be deleted with None, and input_dialog prompts operators. However, it does not mention side effects, permissions, or the nature of the return message (beyond 'operation result message'). This is adequate but not comprehensive.

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 well-structured with Args, Returns, and Examples sections. It is concise yet includes helpful examples. No superfluous content, though the examples slightly lengthen it without being wasteful.

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 a simple setter tool, the description covers variable naming, value types, deletion, and operator prompt behavior. It mentions the return type, and with an output schema present (not shown), additional detail is unnecessary. It is complete for common use cases.

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 add meaning. It explains var_name should start with '$', value can be numeric, text, or None for deletion, and input_dialog triggers an operator prompt. This goes well beyond the schema's type-only information.

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 clearly states the tool sets a global show variable with the verb 'Set' and resource 'global show variable'. Examples reinforce the purpose. However, it does not explicitly differentiate from sibling tools like set_user_variable or add_variable, missing an opportunity for clarity.

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?

No guidance is provided on when to use set_variable versus alternatives (e.g., set_user_variable, add_variable). The description focuses solely on mechanics without indicating context or exclusions.

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

Install Server

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/chienchuanw/gma2-mcp'

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