Skip to main content
Glama

add_user_variable

Add or update a user-specific variable by summing numeric values or concatenating text strings. Use variable names starting with $.

Instructions

Add to / extend a user-profile-specific variable (AddUserVar).

Numeric values are summed; text values are concatenated.

Args:
    var_name: Variable name (should start with $)
    value: Value to add (numeric) or append (text)

Returns:
    str: Operation result message

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
var_nameYes
valueYes

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 numeric values are summed and text concatenated, and that the variable is user-profile-specific. However, it does not clarify whether the variable must already exist or if it is created on first use, nor does it mention potential errors (e.g., type mismatch). This is adequate but not thorough.

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 concise (4 lines) with clear sections: a headline, behavioral rules, argument description, and return type. It is front-loaded with the core purpose and every sentence adds value. No redundant or verbose phrasing.

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

Completeness3/5

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

Given the moderate complexity and presence of an output schema, the description covers the basic behavior and return type. However, it lacks details about variable creation, error handling, and idempotency, which are important for a mutation tool. The sibling list suggests there are similar tools, but no comparative context is provided.

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?

The description adds significant meaning beyond the input schema: it notes that var_name should start with '$', and explains how value type affects behavior (summed vs. concatenated). The schema lists types but lacks this context. Since schema coverage is 0% (no param descriptions in schema), the description compensates well.

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 adds to or extends a user-profile-specific variable. It specifies the resource ('user-profile-specific variable') and action ('Add to / extend'), and distinguishes from siblings like 'set_user_variable' by describing the additive behavior. The behavior for numeric (summing) and text (concatenating) values is explicit.

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 like 'add_variable' or 'set_user_variable'. The description does not mention prerequisites (e.g., variable must exist), nor does it contrast with setting vs. adding. An agent would have to infer usage from the sibling names.

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