Skip to main content
Glama
danielproxd2

MCP_CAD

by danielproxd2

build_part_dsl

Construct a 3D part by chaining build123d-style methods. The DSL compiles to a single batch operation for SolidWorks without executing arbitrary code.

Instructions

Construye una pieza desde un script FLUIDO estilo build123d en UNA llamada.

"Compila una vez, construye una vez": escribe la pieza como UNA expresión encadenada; el servidor la compila a una op-list y la ejecuta como un solo lote (mismas garantías que execute_batch — redibujo/reconstrucción diferidos, rollback todo-o-nada, una sola aprobación). NO ejecuta código: solo una gramática CERRADA (Part() + métodos en lista blanca + edges() + literales); cualquier otra cosa se rechaza.

Ejemplos: build_part_dsl("Part().sketch('front').circle(0,0,20).extrude(30)" ".chamfer(edges(geom='circle', sort='z', dir='desc', pick='first'), d=1)") build_part_dsl("Part().sketch('front').rectangle(-30,-20,30,20).extrude(15)" ".fillet(edges(geom='line'), r=2)")

Métodos: sketch(plane), rectangle(x1,y1,x2,y2), circle(cx,cy,r), line(x1,y1,x2,y2), arc(cx,cy,r,start,end,direction='ccw'), extrude(depth, reverse=False), cut(depth=0, through_all=False), fillet(edges(...), r=R), chamfer(edges(...), d=D, angle=45). Multi-feature: encadena varios sketch(plano) en planos por defecto ('front'/'top'/'right'). edges(...): geom/body/axis/at/tol/min/max/radius/sort/dir/pick/scope (scope 'last_feature'/'new' = Select.LAST/NEW). v1: NO sketch-sobre-cara / selectores de cara (usa create_sketch_on_face con selector por separado).

[en: Build a part from a fluent build123d-style script in one call. A closed grammar compiled to the execute_batch op-list and run; no code is executed.]

Args: script: la expresión fluida. dry_run: si True, solo compila y devuelve la op-list (no toca SolidWorks). rebuild: una reconstrucción al cerrar el lote (default True).

Devuelve el resultado de execute_batch + compiled_ops (qué se ejecutó) + summary. DSL inválido -> error claro; cae a execute_batch o tools sueltas.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scriptYes
dry_runNo
rebuildNo
Behavior5/5

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

With no annotations, the description fully reveals behavioral traits: closed grammar, no code execution, rollback all-or-nothing, deferred redraw/rebuild, single approval, clear error messages, and return structure (execute_batch result + compiled_ops + summary).

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 detailed and well-structured with examples, method list, and English summary. While a bit long, each sentence adds value given the complexity of the DSL grammar.

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?

For a complex DSL tool with no output schema, the description covers the entire API: grammar, supported methods, edges, parameters, return value, and error handling. It's fully self-contained.

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?

Input schema has 0% description coverage, but the description fully compensates by explaining 'script' as the fluent expression with examples, 'dry_run' as compile-only without touching SolidWorks, and 'rebuild' as a rebuild upon batch close.

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 it builds a part from a fluent build123d-style script in one call. It distinguishes from siblings like execute_batch by explaining it compiles to an op-list and runs as a batch, and from other build tools by emphasizing the closed grammar and no-code-execution nature.

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 states when to use (fluent script, one call), what not to use (NO sketch-on-face, use create_sketch_on_face separately), and mentions fallback to execute_batch or standalone tools. It also provides a list of methods and constraints on grammar.

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