Skip to main content
Glama

cad_variable

Set or list parametric variables in CAD documents, using numeric values or expressions that reference other variables for dynamic dimension control.

Instructions

Set or list parametric variables in the current document.

按 ``action`` 设置(set)或列出(list)当前文档的参数变量。Set with
``value`` and/or ``expr`` (expressions may reference other variables,
e.g. ``width * 2``); ``{name}`` tokens in CLI draw arguments interpolate
the resolved value.

When not to use: variables are document-scoped bookkeeping — do NOT use
them to store free-form strings (only numeric values), and use
``cad_object_update`` for geometry changes rather than variables.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
variableNoVariable action, discriminated by `action`: set (define/update with value, unit or expr) or list.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoVariable name
unitNoUnit suffix
countNoNumber of variables
valueNoEvaluated value
actionYesVariable action
statusYesOperation status: success / error
messageNoStatus description
variablesNoVariable records
Behavior4/5

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

The description adds meaningful context beyond the annotations, such as document-scoped scope, numeric-only values, expression referencing, and {name} interpolation. The annotations (readOnly=false, idempotent=false, destructive=false) are not contradicted, though the description could have noted that the 'list' action is read-only.

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 the main purpose upfront, a usage example, and a 'When not to use' section. The inclusion of Chinese text adds redundancy for an English-consuming agent, but each section contains useful information and the description remains appropriately sized.

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?

Given the tool's complexity (a discriminated union with set/list modes), the description covers all key aspects: setting with value/expr, list mode, interpolation, and explicit exclusions. The presence of an output schema means return values are already documented, so the description is complete for selecting and invoking the tool.

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 input schema already provides 100% coverage with detailed descriptions for all fields. The tool description adds extra semantic value by explaining how value and expr can be combined, giving an example expression, and describing CLI interpolation with {name} tokens, which goes 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 'Set or list parametric variables in the current document', providing a specific verb and resource. It distinguishes this tool from siblings by focusing on document-scoped variable bookkeeping, which no other sibling tool covers.

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?

The description gives explicit when-to-use and when-not-to-use guidance: it warns against storing free-form strings and explicitly names cad_object_update as the alternative for geometry changes. It also explains how to use value/expr and the {name} interpolation, giving concrete usage context.

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/Tianshang301/TianshangCAD'

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