Skip to main content
Glama
danielproxd2

MCP_CAD

by danielproxd2

extrude_cut

Subtract material from a part using an active sketch and control cut depth, direction, and end condition for holes, slots, and pockets.

Instructions

Exit the active sketch and cut (subtract) material from the part.

Mirrors the SolidWorks "Cortar-Extruir → Direccion 1" UI panel. Most common autoparts use: drilling bolt holes through a bracket, cutting slots for adjustment, removing material around features.

Args: depth_mm: Cut depth in mm. Required (positive) for end_conditions "blind", "mid_plane", and "offset_from_surface" (per-condition meaning below). Ignored for the others — pass 0.0 (the default).

end_condition: One of:
    - "blind" (default, "Hasta profundidad especificada"): cut a
      fixed depth on ONE side of the sketch plane.
    - "through_all" ("Por todo"): cut through everything on ONE
      side of the sketch plane. Useful for bolt holes when you
      don't know the body thickness.
    - "through_all_both" ("Por todo - Ambos lados"): cut through
      everything on BOTH sides of the sketch plane. Use when the
      sketch sits in the middle of a body.
    - "mid_plane" ("Plano medio"): cut symmetrically about the
      sketch plane. depth_mm is total — split equally per side.
      Common for keyways, oil grooves, symmetric lightening
      pockets in cast housings and shafts.
    - "up_to_next" ("Hasta el siguiente"): cut up to the next
      surface that intersects the cut profile. Useful for cuts in
      multi-wall weldments / housings where the cut should stop
      at the next inner wall. No depth or reference required.
    - "up_to_surface" ("Hasta la superficie"): cut up to a named
      face or reference plane. Requires `reference_name`.
      Live caveat: in SW Spanish 2024 via this binding, FeatureCut4
      with T1=UpToSurface accepts FACE references but rejects
      reference-plane references (returns None even with the plane
      correctly selected at Mark=32). Use a face name (e.g.
      "Cara<2>@Pieza1") for "up_to_surface". For "cut up to a
      reference plane", use "offset_from_surface" with a very
      small offset, which works for both faces and planes.
    - "offset_from_surface" ("Equidistante de la superficie"):
      cut up to an offset distance past a named face. Requires
      `reference_name` AND positive depth_mm. Use `offset_reverse`
      to flip which side of the face the offset goes.
    - "up_to_body" ("Hasta el sólido"): cut up to a named solid
      body. Requires `reference_name` (the body name from
      get_active_part_info "bodies"). Common in multi-body
      weldments and fixture layouts.

reference_name: Locale-sensitive entity name from
    get_active_part_info — face/plane name (e.g. "Cara<2>@Pieza1",
    "Plano1@Pieza1") or solid-body name (e.g. "Saliente-Extruir1").
    Required when end_condition needs a reference; pass None
    otherwise (the tool will reject reference_name on conditions
    that don't accept one — fail loud rather than silently
    ignored).

target_bodies: Feature Scope (alcance de la operación). Pass None
    (default) to let SolidWorks auto-select all bodies the cut
    geometrically intersects. Pass a list of body names to
    restrict the cut to exactly those bodies (the SW UI's
    "Cuerpos seleccionados" mode). Body names come from
    get_active_part_info "bodies". Empty list raises — pass None
    to mean "all".

offset_reverse: Only meaningful for "offset_from_surface" — flips
    which side of the reference face the offset goes. Ignored for
    all other end conditions.

reverse_direction: Flip the cut direction relative to the
    sketch's natural default. The default (False) cuts INTO the
    body for both plane-anchored and face-anchored sketches. Pass
    True when the sketch's orientation breaks that heuristic —
    sketch on a back face, ref plane interior to the body, etc.
    If the result is "FeatureCut4 returned None" with cut
    direction listed as a likely cause, retry with True.

start_condition: Where the cut BEGINS — "sketch_plane" (default) or
    "offset". "offset" starts the cut start_offset_mm off the sketch
    plane, so a sketch on a real outer face can carve a mid-body BAND
    (start_offset_mm = where it begins, depth_mm = its width with
    end_condition="blind") WITHOUT an interior reference plane (which
    silently makes a zombie sketch).
start_offset_mm: Offset (mm, >0) from the sketch plane to the cut
    start; only for start_condition="offset". start_flip picks side.
start_flip: Flip the offset to the other side of the sketch plane.

Returns the new Feature with name (e.g., "Cortar-Extruir1"), type ("cut_extrude"), and dimensions.

Caveat: requires an active sketch AND the sketch geometry must intersect existing solid material. If the sketch is empty/open or misses the body, FeatureCut4 fails.

Failure recovery: same contract as extrude_sketch — on failure the sketch is RE-OPENED so you can fix the profile with more sketch primitives and retry (otherwise later geometry calls would silently no-op against a closed sketch).

Example — M8 clearance hole through a 5mm bracket: create_sketch("front"); create_circle(25, 15, 4.25) extrude_cut(5.0, "blind") Example — in a 2-body part, cut only through the upper boss: extrude_cut(end_condition="through_all", target_bodies=["Saliente-Extruir2"])

Related composites: build_rectangular_pocket (sketch+cut in one call), add_bolt_circle (N holes on a bolt circle), linear_pattern (repeat an existing seed cut).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
depth_mmNo
start_flipNo
end_conditionNoblind
target_bodiesNo
offset_reverseNo
reference_nameNo
start_conditionNosketch_plane
start_offset_mmNo
reverse_directionNo
Behavior5/5

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

No annotations provided, so description carries full burden. Discloses requirement for active sketch and intersecting material, failure behavior (sketch re-opened), return format (Feature with name/type/dimensions), and a known bug with up_to_surface and reference planes.

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?

Long but well-structured with sections (Args, Returns, Caveat, Failure recovery, Example). Every sentence adds value. Front-loaded with purpose. Slightly verbose due to complexity but justified.

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?

Completely covers all 9 parameters, return value, caveats, failure recovery, examples, and even a known bug. No output schema, but description provides sufficient behavioral and semantic context for correct usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Zero schema description coverage, but description provides rich parameter details: conditional meaning of depth_mm, locale-sensitive reference_name, target_bodies as scope, offset_reverse only for offset_from_surface, start_condition/start_offset_mm, etc. Adds value well beyond schema types.

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?

Clearly states the tool cuts/subtracts material from a part after exiting an active sketch. Provides a SolidWorks analogy and common use cases. Distinguishes from siblings like extrude_sketch (additive) and other cut tools by focusing on linear extrude cuts.

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?

Extensive guidance on when to use each end_condition, target_bodies, and other parameters. Includes failure recovery and related composites. Could be more explicit about when not to use this tool vs. revolve_cut, sweep_cut, etc., but the detail is thorough.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/danielproxd2/solidworks-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server