Skip to main content
Glama

to_openscad

Converts an STL/OBJ/PLY mesh into an editable parametric OpenSCAD (.scad) script for simple parts like plates, holes, bosses and fillets, then verifies the script against the mesh and reports deviation.

Instructions

Write an editable parametric OpenSCAD script (.scad) for a simple part.

Same parts as to_cadquery: a box/plate base with rectangular pads, holes and bosses along X, Y, or Z (countersink, draft, and chamfer only when the axis is vertical), one radius on the four vertical corners, a quarter-torus fillet on a vertical boss or hole (boss_N_fillet, hole_N_rim_r, hole_N_floor_r), a straight extrusion of a 2D outline, and a small boolean of those extrusions. Parameter names match the CadQuery script (hole_1_d, boss_1_h, fillet_r, boss_1_fillet, extrude_len, ...). Edit one and render in OpenSCAD. Returns the parameters, whether the openscad CLI verified the script against the mesh, and the measured deviation when it did. Without the openscad program the script is still written and verified is false. Returns an "error" key when the part is outside that vocabulary.

Input Schema

NameRequiredDescriptionDefault
tolNo
input_pathYes
output_pathNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.12.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the return payload (parameters, verification flag, measured deviation), the degradation path when the openscad CLI is absent ('the script is still written and verified is false'), and an 'error' key for out-of-vocabulary parts. It does not say whether an existing file at output_path is overwritten or how long CLI verification may take, leaving some mutation semantics unstated.

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?

Front-loaded with the one-line purpose, then scope, then return behavior. The long parenthetical enumerations of features and parameter names are dense but largely earn their place by defining the accepted vocabulary; a bulleted split of scope vs. returns would read better than the single run-on block.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Returns are well covered despite there being no output schema, and the failure/verification paths are described. The gap is on the input side: for a file-generating tool with three undocumented parameters, an agent still lacks any statement of what input_path must point to (mesh? part file?) and what tol and output_path control.

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

Parameters3/5

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

Schema description coverage is 0% for three parameters (input_path, output_path, tol), and the description explains none of them; tol in particular is left undefined despite likely governing the deviation check. Worse, the phrase 'Parameter names match the CadQuery script (hole_1_d, boss_1_h, fillet_r...)' refers to generated model parameters, not tool inputs, which risks confusing it with the tol/input_path/output_path arguments.

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?

States a specific verb and artifact: 'Write an editable parametric OpenSCAD script (.scad) for a simple part.' It also scopes the accepted geometry vocabulary and explicitly names the sibling to_cadquery as producing the same parts, so an agent can tell the two apart by output format.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied rather than stated: because it produces .scad and 'Same parts as to_cadquery', an agent can infer it is the OpenSCAD-target counterpart to to_cadquery/to_freecad. There is no explicit when-to-use/when-not guidance, no mention of convert, and no stated prerequisite such as the input mesh being a supported simple part beyond the vocabulary hint.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.