Skip to main content
Glama
onshape-mcp

onshape-mcp

by gpambrozio

Extrude a sketch

onshape_extrude

Extrude the closed regions of a sketch into a solid. op=NEW makes a body, ADD merges into existing bodies, REMOVE cuts them, INTERSECT keeps the overlap. end_type picks blind, symmetric or through-all; opposite flips the direction.

Instructions

Extrude the closed regions of a sketch into a solid. op=NEW makes a body, ADD merges into existing bodies, REMOVE cuts them, INTERSECT keeps the overlap. end_type picks blind, symmetric or through-all; opposite flips the direction.

Input Schema

NameRequiredDescriptionDefault
opNoNEW makes a new body; ADD/REMOVE/INTERSECT combine with existing bodies (default NEW).
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 "Extrude").
depthNoExtrusion depth in inches; the total depth when symmetric. Required unless THROUGH_ALL or depth_variable.
sketchYesFeature id of the sketch to extrude.
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 (by name) for the depth instead.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.3.0
    • changedInput schema / properties / depth / description
      Previous value: -"Extrusion depth in inches."New value: +"Extrusion 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

A3.6/5.0
Behavior3/5

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

Annotations carry only a title, so the description bears full behavioral burden. It does usefully disclose that REMOVE cuts existing bodies and INTERSECT keeps overlap, which signals destructive potential. However, it never says the call appends a feature to the tree, that it mutates the Part Studio, or what is returned (feature id?) for chaining.

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: operation first, then the op enum semantics, then the direction/depth knobs. No filler, no repetition, front-loaded with the core action.

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 an 11-parameter mutation tool with full schema coverage and no output schema, the description covers the two semantically weighty enums well. The remaining gap is the return value and the Part Studio context requirement, which is minor given how complete the schema is.

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 every parameter including the op and end_type enums is already fully documented, and the description largely restates the op enum plus a compressed end_type gloss. It adds no syntax, units, or default detail beyond the schema, so the baseline of 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?

The opening sentence names a specific CAD operation and its exact input/output: 'Extrude the closed regions of a sketch into a solid'. It is unambiguous against siblings like onshape_revolve or onshape_sweep, though it never explicitly names an alternative to route away from.

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

Usage Guidelines3/5

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

Explaining what NEW/ADD/REMOVE/INTERSECT do implicitly tells the agent which mode to pick for a given modeling intent, but there is no explicit when-to-use guidance, no prerequisites (sketch must contain closed regions, must live in the same Part Studio as `elem`), and no routing to onshape_boolean for subtractive work.

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