Skip to main content
Glama

sw_set_variables

Create or update global design variables that drive parametric SolidWorks models, optionally targeting a specific document or the active one.

Instructions

Create or update global variables (the parameters that drive the design).

Input Schema

NameRequiredDescriptionDefault
docNoDocument title or path. Defaults to the active document.
variablesYes{'span': 1200, 'chord_root': '"span" / 6'} - numbers in mm, strings are expressions.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already disclose that this is a non-read-only, non-destructive mutation. The description adds semantic context about what global variables are, but does not explain overwrite behavior, scoping across documents, or whether existing variables not mentioned are preserved.

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 definition is a single compact sentence with the core action front-loaded and a useful parenthetical clarification. There is no filler or repetition.

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?

For a low-complexity tool with full schema coverage and annotations covering safety, the description is enough to invoke it. However, it omits sibling routing and behavioral details like persistence or overwrite semantics, leaving it minimally complete rather than rich.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents both the optional document target and the variables object with examples of numbers in mm and string expressions. The description adds no parameter-level detail beyond the schema, so baseline 3 is appropriate.

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 uses a clear verb pair ("Create or update") and a specific resource ("global variables"), and parenthetically clarifies that these are the parameters driving the design. It does not explicitly distinguish itself from nearby siblings like sw_add_equation or sw_set_dimension, so it stops short of a 5.

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 phrase "parameters that drive the design" gives implied context for when to use it, but there is no explicit when-to-use, when-not-to-use, or comparison against alternatives such as sw_add_equation. Usage is inferable but not guided.

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

Deploy Server

Other Tools