Skip to main content
Glama
onshape-jamcp

onshape-jamcp

Insert a part into an assembly

insert_instance

Insert a part or whole Part Studio into an Onshape assembly, returning new instance IDs and names for positioning and mating.

Instructions

Insert a part (or a whole Part Studio) into an Assembly and return the new instances' IDs and names. Name the Assembly tab (rename) if it still says 'Assembly N'. Only when the user asks for an assembly. Join parts with add_mate.

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>",
      "assembly_id": "<assembly_id>",
      "source_element_id": "<source_element_id>"
    },
    "name": "insert_instance"
  }
}

Input Schema

NameRequiredDescriptionDefault
fixedNoGround the instance (it cannot move). Usually the first one.
part_idNoPart ID (list_parts) of the one part to insert. Leave out to insert the whole Part Studio as one instance.
assembly_idYesElement ID of the Assembly tab (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.
configurationNoVariant of a configured Part Studio to insert, e.g. {'Size': 'M18'}.
source_element_idYesElement (tab) ID: the string after /e/ in the Onshape URL. Get it from get_document.
source_document_idNoDocument that holds the Part Studio; defaults to this document.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.1

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare mutation safety, open-world behavior, and non-idempotency; the description adds useful behavior beyond that, including returning new instance IDs/names and renaming the Assembly tab if it is still named 'Assembly N'. It does not discuss permissions or duplicate-instance behavior, but the key side effect is disclosed.

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 short, front-loaded with the core action, and every sentence adds relevant information: insertion scope, return values, rename side effect, usage condition, and next step. There is no redundant restatement of the title.

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?

Given the fully described schema and an output schema, the description covers the essential purpose, usage condition, side effect, and follow-up tool. It is complete enough for correct invocation, though it could mention edit permissions or duplicate-instance handling for full behavioral clarity.

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 explains all eight parameters, including part_id, fixed, configuration, and source_document_id. The description adds little parameter-specific meaning beyond the schema's existing explanations.

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: insert a part or whole Part Studio into an Assembly. It distinguishes the two insertion modes and mentions that it returns new instance IDs and names, so an agent can identify the operation without opening the schema.

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?

It gives clear context: use only when the user asks for an assembly, and join parts with add_mate afterward. It does not list explicit exclusions beyond that, but the when-to-use condition is clear enough for selection.

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