Skip to main content
Glama
hedless

Onshape MCP Server

by hedless

create_variable_studio

Create a new Variable Studio in an Onshape document to define shared variables. These variables become accessible across all Part Studios and can be referenced as #variable_name in expressions.

Instructions

Create a new Variable Studio in a document. Variables defined there are shared across all Part Studios in the document and referenced in expressions as #variable_name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName for the new Variable Studio
documentIdYesDocument ID
workspaceIdYesWorkspace ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.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 burden. It discloses important behavioral traits beyond mere creation: the shared scope across all Part Studios and the expression syntax (#variable_name). This is meaningful context, though it does not address error handling, idempotency, or permissions.

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?

Two sentences with no filler. The first sentence states the action and object, the second adds the most relevant contextual detail. Information is front-loaded and every sentence earns its place.

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 creation tool with three required parameters and no output schema, the description sufficiently explains the core operation and its implications. Minor gaps, such as behavior on duplicate names and return value, are not addressed, but the essential context is present.

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 coverage is 100%, with all three parameters already described in the input schema. The description adds context about how the Variable Studio's name relates to variable references, but does not add parameter-level meaning beyond the schema, so the baseline score of 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 states a specific verb ('Create'), a resource ('Variable Studio'), and its scope ('in a document'). It further distinguishes the tool by explaining the key property: variables are shared across all Part Studios and referenced as #variable_name, which clearly separates it from related entities like Part Studios or variable setters.

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 provides clear context for when to use this tool: when you need document-level variables shared across Part Studios. However, it does not explicitly mention exclusions or alternatives like set_variable or get_variables, leaving that routing implicit.

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