Skip to main content
Glama
onshape-jamcp

onshape-jamcp

Boolean (union, subtract, intersect)

boolean

Combine, cut, or intersect Onshape parts to create merged solids or cutouts; after merging, re-list parts because part IDs change.

Instructions

Combine whole parts: join them (union), cut one with another (subtract: a bolt hole shaped like a part) or keep what they share (intersect). Part IDs change when parts merge, so call list_parts afterwards. The reply says what changed (parts removed, volume).

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>",
      "operation": "<operation>",
      "tools": "<tools>"
    },
    "name": "boolean"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoFeature name (default 'Union').
toolsYesPart IDs (list_parts): everything to union or intersect (two or more), or the cutters of a subtract.
verifyNoMeasure the Part Studio before and after (two extra requests) and report what changed: part count and total volume, plus a warning when nothing changed (Onshape can accept a feature that does nothing). Set false to save requests.
targetsNoSubtract only: the part(s) to cut material out of.
operationYes'union' joins the parts in `tools` into one; 'subtract' cuts the `tools` out of the `targets`; 'intersect' keeps only the volume the `tools` share.
element_idYesElement (tab) ID: the string after /e/ in the Onshape URL. Get it from get_document.
keep_toolsNoSubtract / intersect: keep the tool parts instead of consuming them.
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.1/5.0
Behavior4/5

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

Annotations cover the read/write and open-world profile, and the description adds genuinely new behavioral facts: part identifiers are invalidated by the merge, and the response reports parts removed and volume change. The verify parameter's before/after measurement and "warning when nothing changed" is also disclosed, though the consuming of tool parts is only spelled out in the schema, leaving minor tension with destructiveHint=false.

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?

Three sentences, front-loaded with the core action and the most consequential side effect (ID churn). The parenthetical "a bolt hole shaped like a part" is illustrative padding that a mechanical user does not strictly need, but nothing else is wasted.

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?

An output schema exists, so return values need no explanation, and the description still tells the agent that IDs must be refreshed and that verification can warn about no-op features. For a 9-parameter destructive-ish mutation it is nearly complete; it could state prerequisite that parts must reside in the same Part Studio.

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 targets, tools, keep_tools, verify, and document/element IDs. The description reinforces the operation semantics but adds no parameter-level detail beyond what those field descriptions already supply, so the baseline of 3 applies.

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 concrete verb-plus-resource action ("Combine whole parts") and enumerates all three modes (union, subtract, intersect) with a plain-language gloss of each, so an agent knows exactly what the tool produces. No sibling in the catalog offers boolean combination, and the definition makes that scope unambiguous.

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 explains how to choose between the three operations and gives explicit post-call guidance: "Part IDs change when parts merge, so call list_parts afterwards." It does not name a competing tool or state hard preconditions (e.g. parts must live in the same Part Studio), which keeps it just short of a 5.

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