Skip to main content
Glama

set_global_variable

Update an existing global variable's value and optionally its units; all linked dimensions rebuild automatically.

Instructions

Modificar una variable global existente — actualiza el valor de A, B, C después de haberla creado. Todas las dimensiones ligadas (vía ecuación) se reconstruyen automáticamente.

Uso típico CSWA: tras construir el Tool Block con A=10, B=20, C=30, cambia a A=12, B=22, C=32 antes de leer la masa nueva.

[en: Modify an existing global variable — updates the value of A, B, C after creation. All dimensions bound to it (via equation) rebuild automatically.]

Args: name: The existing variable name (must already exist). new_value: New numeric value in the specified units. units: Optional. If omitted, the previously-set units are preserved. Pass "mm" / "deg" / "raw" to change unit type.

Returns the updated GlobalVariable dict.

Raises ValueError if the variable doesn't exist (call add_global_variable first).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
unitsNo
new_valueYes
Behavior4/5

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

Discloses that all bound dimensions rebuild automatically, and explains units behavior. No annotations provided, so description covers key traits, though could mention additional side effects like write operation.

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?

Concise and well-structured: purpose, typical usage, args, returns, raises. Every sentence adds value; no wasted words.

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

Completeness5/5

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

Complete for a tool with 3 parameters, no output schema, and no annotations. Covers all necessary aspects for agent selection and invocation.

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

Parameters5/5

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

Schema coverage is 0%, but description thoroughly explains each parameter: name must exist, new_value is numeric with units, and units is optional with preservation. Adds significant meaning beyond the schema.

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 modifies an existing global variable, distinguishing it from add_global_variable. The verb 'modificar/updates' and resource 'global variable' are explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides a typical CSWA usage example and specifies prerequisites: variable must already exist. Implicitly tells when not to use (call add_global_variable first) and raises ValueError if not found.

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/danielproxd2/MCP_CAD'

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