Skip to main content
Glama
onshape-jamcp

onshape-jamcp

Create Part Studio or Assembly

create_element

Add a new Part Studio or Assembly tab to an Onshape document and return its element ID, name, and kind; check existing tabs first to avoid duplicates.

Instructions

Add a new tab to a document and return its element_id, name and kind: a Part Studio (where sketches, extrudes and the other features build parts) or an Assembly (where parts are inserted and mated). Use it when the document has no suitable tab - a new document already has a Part Studio and an Assembly, so check get_document first and reuse them instead of piling up empty tabs. Give it a descriptive name (a tab still called 'Part Studio 1' is flagged has_default_name). The new tab is empty: model in it with create_sketch / extrude, or fill an Assembly with insert_instance. It does not create parts, sketches or documents (create_document makes those).

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>",
      "name": "<name>"
    },
    "name": "create_element"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindNoType of element to add.part_studio
nameYesTab name.
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

A4.7/5.0
Behavior4/5

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

The annotations already disclose that this is a non-read-only, non-idempotent, non-destructive, open-world operation. The description adds useful behavioral context: the new tab is empty, a default name is flagged via has_default_name, and repeated creation can pile up empty tabs. It does not need to explain return values because an output schema exists.

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 definition is front-loaded with the core action and its result, then moves through usage constraints, naming advice, and follow-on operations. Every sentence contributes something useful, and there is no redundant restatement of the schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a creation tool with four parameters, complete schema coverage, annotations, and an output schema, the description covers everything an agent needs: what is created, when to create it, how to name it, what state the new tab is in, and which tools to use next.

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 100%, so the baseline would be 3. The description adds meaningful naming guidance beyond the schema by advising a descriptive name and warning that a tab still called 'Part Studio 1' is flagged has_default_name. It also clarifies the practical distinction between the part_studio and assembly kinds.

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 and resource ('Add a new tab to a document') and clearly distinguishes the two possible outputs: Part Studio versus Assembly. It also names what the tool does not create, which separates it from sibling tools like create_document and create_sketch.

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

Usage Guidelines5/5

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

It gives explicit when-to-use guidance: use it only when the document has no suitable tab. It also tells the agent to check `get_document` first and reuse existing tabs, and it names alternatives such as `create_document`, `create_sketch`, and `extrude`.

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