Skip to main content
Glama
Onshape MCP

Onshape MCP

onshape_add_feature

Adds a feature to an Onshape Part Studio workspace using a BTMFeature JSON object, enabling sketches, extrudes, and other parametric operations via API.

Instructions

Add a feature to a Part Studio (workspace only). feature is a BTMFeature-134 JSON object, e.g. {"btType": "BTMFeature-134", "featureType": "extrude", "name": "Extrude 1", "parameters": [...]}. Read an existing Part Studio with onshape_get_features to see the exact parameter shapes. Tips: sketches use btType "BTMSketch-151" with featureType "newSketch", a "sketchPlane" query (default plane deterministicIds: Top "JDC", Front "JCC", Right "JEC") and "entities" (e.g. BTMSketchCurve-4 + BTCurveGeometryCircle-115, lengths in meters). Extrude takes bodyType (enumName "ExtendedToolBodyType"), operationType ("NewBodyOperationType": NEW/ADD/REMOVE), entities (BTMIndividualSketchRegionQuery-140 with the sketch featureId), endBound ("BoundingType": BLIND) and depth (BTMParameterQuantity-147 expression like "30 mm"). See README for a full tested example. The response includes featureState - check it for errors (featureStatus != OK).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "did": "<did>",
      "wid": "<wid>",
      "eid": "<eid>",
      "feature": "<feature>"
    },
    "name": "onshape_add_feature"
  }
}

Input Schema

NameRequiredDescriptionDefault
didYes
eidYes
widYes
featureYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly=false, idempotent=false, destructive=false, so the safety profile is covered; the description adds the useful post-call behavior that the response carries featureState and must be inspected for featureStatus != OK. It does not say what happens on a partially valid payload or whether a failed call leaves artifacts, which a non-idempotent mutation tool could use.

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?

Front-loaded with the purpose and the feature JSON contract, then organized under a 'Tips:' block, so scanning works. It is dense but every clause carries concrete syntax; the one weak point is the pointer to an external 'README', which an agent cannot read.

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 complex mutation with an output schema and 0% schema coverage, this supplies the domain vocabulary an agent needs to build a valid feature payload (sketch, extrude, queries, enums) plus an error-check loop. Gaps are the meanings of did/wid/eid and any statement of required permissions or failure semantics.

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?

Schema coverage is 0% (all four params have only bare titles), so the description must compensate, and it does so extensively for the one hard parameter 'feature' — btType, featureType, sketch plane deterministicIds, extrude enums, depth expressions, and a worked JSON shape. The three ID params (did/wid/eid) are never expanded beyond their names, leaving that part to convention.

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?

States a specific verb and resource ('Add a feature to a Part Studio') and scopes it with '(workspace only)', which an agent can distinguish from onshape_update_feature and onshape_delete_feature by verb alone. It does not explicitly contrast itself with those siblings, keeping it just below 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 Guidelines4/5

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

Gives real preparatory guidance: read the target Part Studio with onshape_get_features first to learn the exact parameter shapes, and check featureState/featureStatus after the call. It also implies a when-not via the workspace-only restriction, but never states when to prefer update_feature over add_feature.

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