Skip to main content
Glama
dsh18235538266-crypto

onshape-mcp-codex

get_variables

Fetch all variables from a Variable Studio or Part Studio element by ID, providing direct access to defined parameters for downstream CAD use.

Instructions

Get all variables from a Variable Studio (or Part Studio). Modern Onshape stores variables in dedicated Variable Studio elements; pass a Variable Studio elementId here to read its variables. Pass a Part Studio elementId to read the (usually empty) variables owned by that PS.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
elementIdYesVariable Studio (preferred) or Part Studio element ID
documentIdYesDocument ID
workspaceIdYesWorkspace ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full behavioral burden. It explicitly says the tool 'reads' variables, states the preferred element type, and warns that Part Studio variable lists are usually empty. It does not describe the return format, but this is a simple, read-only operation and the disclosure is solid.

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?

Three concise sentences with no fluff. The first sentence states the core purpose, and the following sentences provide exactly the contextual nuance needed to use the tool correctly.

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 read operation with three required IDs and no output schema, the description gives sufficient guidance to select the correct elementId. The only minor gap is the lack of explicit mention of what the returned variables look like, but the name and description make that predictable.

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?

All three parameters are documented in the schema, so schema description coverage is 100%. The description adds a bit of semantic value by explaining the elementId distinction between Variable Studio and Part Studio, but much of that is already reflected in the schema's elementId description. Baseline 3 is appropriate.

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 operation ('Get all variables') and the resource type (Variable Studio or Part Studio). It adds meaningful context about how modern Onshape stores variables, which distinguishes this read tool from siblings like set_variable and create_variable_studio.

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

Usage Guidelines4/5

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

The description gives concrete guidance on when to pass a Variable Studio elementId versus a Part Studio elementId, and even sets expectations that Part Studio variables are usually empty. It does not explicitly name alternative tools, but the usage conditions are clear enough for an agent to decide correctly.

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