Skip to main content
Glama
hedless

Onshape MCP Server

by hedless

get_variables

Retrieve all variables from an Onshape Variable Studio, including names and values, for use as shared #name references across the document.

Instructions

Get all variables from a Variable Studio (variables are shared across the document and referenced as #name)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
elementIdYesVariable Studio element ID (create one with create_variable_studio)
documentIdYesDocument ID
workspaceIdYesWorkspace ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.4.0
    • changedInput schema / properties / elementId / description
      Previous value: -"Part Studio element ID"New value: +"Variable Studio element ID (create one with create_variable_studio)"
  2. First observedv0.3.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. 'Get all variables' clearly signals a read operation, and the shared/#name context is useful, but the description does not mention return format, error behavior, or side-effect guarantees.

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 description is a single front-loaded sentence with no wasted words. The verb and resource appear immediately, and the parenthetical adds useful domain context without bloating the definition.

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 simple getter with three required IDs, this is largely adequate. However, with no output schema and no annotations, the description could have stated exactly what is returned (e.g., variable names, values, or types) to make result interpretation fully self-contained.

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 all three parameters. The description adds general context about variables being shared and #name-referenced, but it does not add meaningful parameter-specific semantics beyond what the schema provides.

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 uses a specific verb ('Get'), a clear resource ('all variables from a Variable Studio'), and adds domain context that these variables are shared and referenced as #name. This makes the tool's purpose immediately distinguishable from related tools like set_variable or 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 Guidelines3/5

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

The usage is implied: call this when you need to retrieve all variables in a Variable Studio, especially to understand or resolve #name references. However, there is no explicit guidance about when not to use it or how it compares with alternatives like set_variable.

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