Skip to main content
Glama

extrude_cut

Subtract material from a solid part using an active sketch. Supports blind, through all, up to surface, and offset cuts for precise material removal.

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. It clearly states prerequisites (active sketch, intersecting material), failure behavior (sketch reopened), and caveats (bug with reference planes in up_to_surface). Returns a Feature with name, type, dimensions.

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?

The description is well-structured with sections (Args, Returns, Caveat, Failure recovery, Example, Related composites) and front-loaded with the core action. It is somewhat verbose given the complexity but remains organized and readable.

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?

Given the tool has 9 parameters, no output schema, and complex interactions, the description covers all necessary context: failure modes, edge cases, parameter dependencies, return value, and even a known bug workaround. It is thoroughly complete.

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?

Schema description coverage is 0%, but the description provides detailed explanations for all 9 parameters, including meaning, defaults, interactions (e.g., depth_mm ignored for certain end_conditions), and workarounds. This far exceeds the baseline expectation.

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 clearly states the tool cuts material from a part, exiting the active sketch. It provides specific verb+resource ('cut material from the part') and distinguishes from siblings like extrude_sketch (adds material) by contrast in examples.

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?

The description provides extensive guidance on when to use each end_condition with examples (bolt holes, slots, etc.) and mentions related composites (build_rectangular_pocket, add_bolt_circle). It does not explicitly state when not to use this tool vs alternatives but covers usage context well.

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/MCP_CAD'

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