Skip to main content
Glama

extrude_sketch

Extrude a closed 2D sketch to create a solid boss feature. Set depth, direction, and whether to merge with existing bodies.

Instructions

Exit the active sketch and extrude it as a boss (solid) feature.

Args: depth_mm: Extrusion depth in mm (must be positive). end_condition: "blind" (fixed depth — default) or "through_all" (extrudes to the next surface; depth_mm is ignored). reverse_direction: Flip the extrude direction along the sketch plane normal. Default (False) extrudes the SW-default way — for a Front-plane sketch in this binding, that's +Z. Pass True to extrude the opposite way (e.g. -Z from Front).

    Gotcha — face-anchored sketches: after `create_sketch_on_face`,
    the default extrudes INTO the body (toward the inward normal —
    the cut/pocket case). Pass `reverse_direction=True` for raised
    features (hubs, bosses) — the typical intent on top of a face.
merge: If True (default), the new boss merges with any existing
    solid material it touches. Pass False to keep the new
    extrusion as a SEPARATE body — required for back-to-back
    stacks where two extrudes share a face (without merge=False
    on the second one, SW fuses them into one body), and for any
    multi-body workflow where target_bodies needs to address the
    new body independently.

Returns the new Feature with name (e.g., "Saliente-Extruir1"), type ("boss_extrude"), and dimensions. After this call the sketch is closed and the part has a new solid feature.

Caveat: the active sketch must contain at least one closed profile (e.g., a rectangle from create_rectangle). FeatureExtrusion3 fails if the sketch is empty, open, or self-intersecting.

Failure recovery: when extrude_sketch fails (e.g., open profile), the sketch is RE-OPENED automatically — fix the profile with more sketch primitives and retry (otherwise later geometry calls would silently no-op against a closed sketch).

Example — 50×30×5 mm box on the Front plane: create_sketch("front") create_rectangle(0, 0, 50, 30) extrude_sketch(5.0)

Example — back-to-back blocks (one in +Z, one in -Z) from the same Front-plane sketch, kept as TWO separate bodies: create_sketch("front"); create_rectangle(0, 0, 30, 30) extrude_sketch(20.0) # body in +Z create_sketch("front"); create_rectangle(0, 0, 30, 30) extrude_sketch(20.0, reverse_direction=True, merge=False) # body in -Z, separate

Related: build_flange_boss (sketch + extrude in one call). Use revolve_sketch / sweep_sketch / shell_part for true Revolución / Barrer / Vaciar features — don't approximate with stacked extrudes. loft is NOT in v1 (see list_capabilities() for the gap list).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mergeNo
depth_mmYes
end_conditionNoblind
reverse_directionNo
Behavior5/5

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

With no annotations, the description fully carries the burden. It discloses the sketch is closed after extrusion, the feature is a new solid, the effect of reverse_direction on face-anchored sketches, merge behavior, and the return type (Feature with name, type, dimensions). It also warns about open/self-intersecting profiles and automatic re-opening on failure.

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 headings (Args, Returns, Caveat, Failure recovery, Example) and is front-loaded with the main action. While every sentence adds value, it is somewhat lengthy; minor trimming could improve conciseness without losing clarity.

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 no output schema, the description details the return value (Feature with name, type, dimensions). It covers prerequisites (closed profile), failure modes (reopening), and provides two examples showing typical usage and advanced multi-body case. Complete for a mutating tool.

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%, so the description must compensate. It thoroughly explains each parameter: depth_mm (positive), end_condition (blind vs. through_all with note that depth_mm ignored), reverse_direction (default direction and gotcha for face-anchored sketches), and merge (default True, when to use False for multi-body). Examples illustrate usage, adding significant meaning beyond 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?

The description clearly states the tool exits the active sketch and extrudes it as a boss (solid) feature. It distinguishes itself from siblings like build_flange_boss (which combines sketch and extrude) and explicitly mentions other related tools (revolve_sketch, sweep_sketch, shell_part) and a missing feature (loft).

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?

The description provides explicit guidance on when to use the tool: after creating a sketch with at least one closed profile. It details failure recovery (sketch reopens on failure) and offers alternatives (e.g., use build_flange_boss for combined sketch+extrude, not for loft). It also explains parameter nuances like merge=False for multi-body workflows.

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