Skip to main content
Glama
onshape-jamcp

onshape-jamcp

Add raw feature (advanced)

add_feature

Create any Onshape Part Studio feature—revolves, sweeps, holes, patterns—by supplying raw feature JSON with native-unit expressions. Use it when standard tools lack the needed feature.

Instructions

Advanced escape hatch: add any Onshape feature from raw JSON - revolve, patterns, sweeps, holes, and so on. Copy the structure from an existing feature (list_features with feature_id) or from onshape_api_request on the Part Studio featurespecs endpoint. Raw JSON uses Onshape's native units (lengths are written as expressions like '10 mm').

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": {
      "document_id": "<document_id>",
      "element_id": "<element_id>",
      "feature": "<feature>"
    },
    "name": "add_feature"
  }
}

Input Schema

NameRequiredDescriptionDefault
featureYesOnshape feature JSON (a BTMFeature-134 object with featureType, name and parameters). A full BTFeatureDefinitionCall body is accepted too.
element_idYesElement (tab) ID: the string after /e/ in the Onshape URL. Get it from get_document.
document_idYesOnshape document ID: the 24-character hex string after /documents/ in the document URL. Get it from list_documents.
workspace_idNoWorkspace ID (the string after /w/ in the URL). Optional - defaults to the document's main workspace.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.1

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare the write/creation semantics (readOnlyHint=false, destructiveHint=false, idempotentHint=false, openWorldHint=true). The description adds genuinely useful behavior beyond that: raw JSON must use Onshape native units, with lengths as expressions like '10 mm'. It does not address failure modes, validation behavior, or what happens if the feature spec is malformed.

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 core distinction ('Advanced escape hatch') followed by the construction recipe. Four short clauses, no filler, though the example list of feature types is slightly padded.

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 nested-object, high-complexity tool this covers what an agent most needs: where to obtain a valid feature spec and the unit convention. With an output schema present, return values need no explanation, so remaining gaps are limited to error behavior.

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 `feature`, `element_id`, `document_id`, and `workspace_id` are all documented in the schema itself. The description adds only the units convention for the JSON body, which is a modest but real supplement; baseline 3 applies.

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 any Onshape feature from raw JSON', with examples (revolve, patterns, sweeps, holes). The 'Advanced escape hatch' framing implicitly distinguishes it from the typed sibling tools like extrude/revolve, but it never states the relationship explicitly.

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 concrete when-to-use context: this is the escape hatch for features not expressible through the typed tools. It also names two concrete sources of correct JSON structure (`list_features` with `feature_id`, or `onshape_api_request` on `featurespecs`). It stops short of an explicit 'prefer revolve/extrude for standard features' exclusion.

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