Skip to main content
Glama
danielproxd2

MCP_CAD

by danielproxd2

extrude_sketch

Extrude a closed sketch profile into a solid boss feature. Control depth, end condition (blind or through all), 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?

No annotations exist, so description carries full burden. It discloses extrusion behavior, parameter effects (including reverse_direction gotcha for face sketches), merge behavior, return values, sketch closure, and failure recovery. Exhaustive.

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 thorough and well-structured with sections (Args, Returns, Caveat, etc.) and front-loaded action. While somewhat lengthy, every sentence adds value with no redundancy. Could be slightly tighter.

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, 4 parameters, and no annotations, the description covers all critical aspects: parameters, return info, prerequisites, error handling, multiple examples, and sibling tool relationships. Nothing missing.

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 has 0% description coverage; the description fully compensates. Each parameter (depth_mm, end_condition, reverse_direction, merge) is explained with constraints, defaults, and behavioral effects. Examples illustrate usage.

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 feature. It uses a specific verb (extrude) and resource (active sketch). It distinguishes from siblings like build_flange_boss and revolve_sketch.

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?

Explicitly provides when to use vs alternatives: mentions build_flange_boss for combined sketch-extrude, advises against using extrudes for revolve/sweep features, and notes loft is not available. Also covers failure recovery and examples.

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