Skip to main content
Glama
SolidworksMCP-python

SolidworksMCP-python

Create Extrusion

create_extrusion

Extrude a closed sketch into a solid boss on the active part, with blind, mid-plane, through-all, draft, and thin-wall options.

Instructions

Extrude the sketch you just closed into a solid boss, added to the active part.

Use it after exit_sketch; to remove material, use create_cut_extrude. It extrudes the sketch sketch_name names, or the one exit_sketch closed last; a name that isn't in the feature tree fails before anything is built. End conditions: Blind (default), MidPlane, ThroughAll, UpToNext; both_directions means MidPlane. With thin_feature and thin_thickness it makes a wall from the sketch's outline, and an open chain works (a bent plate from its centreline). Needs: an open part and a closed profile (open is fine when thin). Changes: adds a Boss-Extrude feature. Returns: extrusion (name, sketch when one was named, depth, the end_condition SolidWorks used, both_directions, and thin when thin) and measured_change (volume, bounding box and solid-body count before and after; left out when the model can't be read).

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": {
      "input_data": "<input_data>"
    },
    "name": "create_extrusion"
  }
}

Input Schema

NameRequiredDescriptionDefault
input_dataYesThe extrusion. `depth` (mm) is required; `sketch_name`, `end_condition`, `both_directions`, `reverse_direction`, `draft_angle`, `thin_feature`/`thin_thickness` and `merge_result` have defaults.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed11 schema fields changedv2.0.0
    • changedInput schema / properties / input_data / description
      Previous value: -"The input data value."New value: +"The extrusion. `depth` (mm) is required; `sketch_name`,\n`end_condition`, `both_directions`, `reverse_direction`,\n`draft_angle`, `thin_feature`/`thin_thickness` and `merge_result`\nhave defaults."
    • changedInput schema / properties / input_data / properties / both_directions / description
      Previous value: -"Extrude in both directions"New value: +"Extrude symmetrically about the sketch plane (mid-plane): `depth` is the total thickness, half on each side"
    • removedInput schema / properties / input_data / properties / direction
      Removed value: -{
      -  "default": "blind",
      -  "description": "Extrusion direction",
      -  "type": "string"
      -}
    • addedInput schema / properties / input_data / properties / sketch_name / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / input_data / properties / sketch_name / default
      Added value: +null
    • changedInput schema / properties / input_data / properties / sketch_name / description
      Previous value: -"Sketch name to extrude"New value: +"Sketch to use, by its name in the feature tree (e.g. \"Sketch2\"); omit to use the sketch `exit_sketch` closed last"
    • removedInput schema / properties / input_data / properties / sketch_name / type
      Removed value: -"string"
    • changedInput schema / properties / input_data / properties / thin_feature / description
      Previous value: -"Create as thin wall feature"New value: +"Make a thin wall of `thin_thickness` from the sketch's outline; the sketch may be an open chain (a bent plate's centreline)"
    • addedInput schema / properties / input_data / properties / thin_side
      Added value: +{
      +  "default": "one_side",
      +  "description": "Which side of the sketch line the thin wall grows on: one_side, other_side, or mid_plane (half each side)",
      +  "enum": [
      +    "one_side",
      +    "other_side",
      +    "mid_plane"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / input_data / properties / thin_thickness / description
      Previous value: -"Thickness for thin wall feature in mm"New value: +"Wall thickness in mm; required with thin_feature"
    • changedInput schema / properties / input_data / required
      Previous value: -[
      -  "sketch_name",
      -  "depth"
      -]New value: +[
      +  "depth"
      +]
  2. First observedv1.0.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations only declare the safety profile (readOnly false, idempotent false, destructive false); the description adds a failure mode ('a name that isn't in the feature tree fails before anything is built'), the resulting model change (adds a Boss-Extrude feature), and how end conditions and thin walls behave. It stops short of saying whether the operation is reversible or what happens on partial failure, so it is strong but not exhaustive for a mutation tool.

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?

Front-loaded with the action and the routing to create_cut_extrude, then folds constraints into compact segments. The trailing 'Returns:' enumeration largely restates the output schema and the long parenthetical makes some sentences dense, but there is little outright waste.

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?

Covers prerequisites, failure behavior, model effects, and the measured_change readout, which is enough for an agent to call this correctly even on a complex nested schema. Because an output schema exists, the return-value sentence is redundant but harmless rather than a 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: it enumerates the valid end conditions (Blind default, MidPlane, ThroughAll, UpToNext), explains that both_directions means MidPlane, and clarifies that thin_feature permits an open chain. Minor params such as draft_angle, merge_result and the reverse aliases are left entirely to the schema.

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?

States a concrete verb and result: 'Extrude the sketch you just closed into a solid boss, added to the active part.' It names the sibling it is not (create_cut_extrude for material removal), so an agent can distinguish the two without opening either schema.

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?

Gives an explicit prerequisite ('Use it after exit_sketch') and an explicit alternative with its selecting condition ('to remove material, use create_cut_extrude'). It also states the preconditions that gate a successful call: an open part and a closed profile, with the thin-feature exception spelled out.

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