Skip to main content
Glama
onshape-mcp

onshape-mcp

by gpambrozio

Cut a hole

onshape_hole

Extrude a sketch as a cut (op=REMOVE). Sketch a circle first, then cut it through the body: end_type THROUGH_ALL needs no depth. A sketch on a body's face points out of the body, so pass opposite to cut into it.

Instructions

Extrude a sketch as a cut (op=REMOVE). Sketch a circle first, then cut it through the body: end_type THROUGH_ALL needs no depth. A sketch on a body's face points out of the body, so pass opposite to cut into it.

Input Schema

NameRequiredDescriptionDefault
wsYesWorkspace id — the <ws> segment of the document URL.
docYesDocument id — the <doc> in cad.onshape.com/documents/<doc>/w/<ws>/e/<elem>.
elemYesElement id (tab) — the <elem> segment of the document URL.
nameNoFeature name shown in the tree (default "Hole").
depthNoCut depth in inches; the total depth when symmetric. Required unless THROUGH_ALL or depth_variable.
sketchYesFeature id of the sketch to cut with.
end_typeNoBLIND goes `depth` along the sketch normal (default); SYMMETRIC goes `depth` in total, half each side of the sketch plane; THROUGH_ALL goes past every body and ignores `depth`.
oppositeNoGo against the sketch normal instead of along it. Not with SYMMETRIC.
validateNoRe-read the feature list afterwards and fail if the feature regenerated with an error (default true).
depth_variableNoUse a Part Studio variable for the depth.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.3.0
    • changedInput schema / properties / depth / description
      Previous value: -"Cut depth in inches; make it deeper than the body to cut through."New value: +"Cut depth in inches; the total depth when symmetric. Required unless THROUGH_ALL or depth_variable."
    • addedInput schema / properties / end_type
      Added value: +{
      +  "description": "BLIND goes `depth` along the sketch normal (default); SYMMETRIC goes `depth` in total, half each side of the sketch plane; THROUGH_ALL goes past every body and ignores `depth`.",
      +  "enum": [
      +    "BLIND",
      +    "SYMMETRIC",
      +    "THROUGH_ALL"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / opposite
      Added value: +{
      +  "description": "Go against the sketch normal instead of along it. Not with SYMMETRIC.",
      +  "type": "boolean"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "doc",
      -  "ws",
      -  "elem",
      -  "sketch",
      -  "depth"
      -]New value: +[
      +  "doc",
      +  "ws",
      +  "elem",
      +  "sketch"
      +]
  2. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations carry only a title, so the description bears the full burden and does disclose that material is removed ('cut it through the body'), making the mutating/destructive nature unambiguous. It omits supporting behavior such as that a feature is added to the tree or how validation failures surface, which keeps it short of a 5.

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?

Three tight sentences with zero filler, front-loaded on what the tool does before moving to the prerequisite and then the directional pitfall. Every sentence contributes operational information.

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 10-parameter mutation tool with no annotations and no output schema, the description covers the two things an agent is most likely to get wrong (depth-less THROUGH_ALL and opposite-direction cuts). It does not say what is returned or how the feature id is surfaced, which leaves a small gap.

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 is 3, but the description adds genuine meaning the schema lacks: the sketch-normal orientation rule explains why and when to set `opposite`, and it confirms THROUGH_ALL ignores depth. `name`, `depth_variable` and `validate` are left to the schema, which documents them well.

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 effect: 'Extrude a sketch as a cut (op=REMOVE)', which immediately distinguishes it from the plain onshape_extrude add operation. It never names onshape_extrude explicitly, so the differentiation is implied rather than stated.

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 a concrete prerequisite workflow ('Sketch a circle first') and conditional guidance ('end_type THROUGH_ALL needs no depth', 'pass opposite to cut into it'). It does not frame when to choose this over onshape_extrude or other cut-producing tools, so there is no explicit exclusion clause.

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

Deploy Server

Other Tools