Skip to main content
Glama

build_part_dsl

Build a 3D part from a fluent build123d-style script using a closed grammar that compiles to operations and executes in one call with no code execution.

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?

In the absence of annotations, the description thoroughly discloses behavior: it compiles to an op-list and executes as a batch with deferred redraw, all-or-nothing rollback, and single approval. It also describes the return value (execute_batch result plus compiled_ops and summary) and error handling (clear error for invalid DSL).

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 front-loaded with the main purpose and examples. However, it is somewhat lengthy due to the list of methods and bilingual content. It could be slightly more concise, but the structure is clear and informative.

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's complexity (DSL with many methods and options), the description is comprehensive: it explains the grammar, supported methods, edges function, scope options, and fallback behavior. It provides enough context for an agent to use the tool correctly without additional clarification.

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

Parameters4/5

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

With 0% schema description coverage, the description provides meaningful information for each parameter: script is 'la expresión fluida' with examples, dry_run compiles without affecting SolidWorks, and rebuild triggers a rebuild on batch close. This compensates well for the schema's lack of descriptions.

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 that it builds a part from a fluent build123d-style script in one call. It specifies the closed grammar and compilation to op-list, distinguishing it from individual geometry tools like create_rectangle or extrude_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?

The description explains when to use this tool versus alternatives: explicitly advises against using it for sketch-on-face (use create_sketch_on_face instead), and mentions fallback to execute_batch or loose tools for invalid DSL. It provides examples and lists supported methods.

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