mesh2cad
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| convertA | Convert an STL/OBJ/PLY mesh into a STEP B-rep with fitted planes, cylinders, spheres, cones, and constant-radius fillets. Args: input_path: path to the mesh file. output_path: STEP path to write (default: input with .step suffix). tol: fit tolerance in model units (~ mesh noise); default 0.1% of bbox diagonal. cylinders: also fit cylinders (holes, bosses, plane-plane fillets). spheres: also fit spheres (domes, spherical bosses). cones: also fit cones (chamfers, countersinks, tapered bosses). Returns the fidelity report (method, faces, deviation, volume error) and output path. |
| analyzeC | Segment a mesh and report detected surfaces without writing STEP. |
| reportC | Full Markdown fidelity report for converting this mesh. |
| to_cadqueryC | Write an editable parametric CadQuery script (.py) for a simple part. Works for a box/plate base with rectangular pads, holes along X, Y, or Z (through, blind, counterbored, and countersunk when the axis is vertical), bosses along X, Y, or Z (straight, and drafted or chamfered when the axis is vertical), fillet_r on the four vertical corners, edge_fillet_r when every edge of the box shares one radius (a through-hole that clears those rounds is cut after the fillet, and a straight boss that clears them is fused after it), fillet_r on every vertical edge of an L-bracket including the inner corner (base_x, base_y, base_t, leg_x, leg_y), through-holes in the foot and the upright of that bracket (base_hole_N_d, leg_hole_N_d), a row, axis-aligned grid, or bolt circle of plain Z through-holes (hole_row_1_n, hole_row_1_pitch, hole_grid_1_nx, hole_grid_1_pitch_x, hole_circle_1_n, hole_circle_1_r), a straight obround through-slot along Z (slot_1_len, slot_1_w, slot_1_x, slot_1_y, slot_1_angle), a fillet at the base of a vertical boss (boss_N_fillet), a round on a vertical hole rim (hole_N_rim_r, hole_N_bot_rim_r) and a blind-hole floor fillet (hole_N_floor_r), a straight extrusion of a 2D outline along X, Y, or Z (straight round bosses on the top face of a Z extrusion are boss_N_d, boss_N_h, boss_N_x, boss_N_y; a vertical countersink on that Z extrusion is hole_N_csk_d and hole_N_csk_angle, and a counterbore is hole_N_cbore_d and hole_N_cbore_depth; vertical corners of that Z extrusion that share one radius are outline_fillet_r), and a small boolean of those extrusions (intersection, or one minus a cut along another axis) with round through-holes, counterbores, and a few planar clips. Each dimension is a named parameter (e.g. hole_1_d = 6.0, extrude_len): edit it and run the script with Python to regenerate the part. Returns the parameters and the measured deviation of the script's output from the mesh. Returns an "error" key when the part is outside that vocabulary. |
| to_openscadB | 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, edge_fillet_r when every edge of the box shares one radius (a through-hole that clears those rounds is cut after the fillet, and a straight boss that clears them is fused after it), fillet_r on every vertical edge of an L-bracket including the inner corner (leg_x, leg_y), through-holes in the foot and the upright of that bracket (base_hole_N_d, leg_hole_N_d), a row, axis-aligned grid, or bolt circle of plain Z through-holes (hole_row_1_n, hole_row_1_pitch, hole_grid_1_nx, hole_circle_1_n, hole_circle_1_r), a straight obround through-slot along Z (slot_1_len, slot_1_w, slot_1_angle), 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 (straight round bosses on the top face of a Z extrusion are boss_N_d, boss_N_h, boss_N_x, boss_N_y; a vertical countersink on that Z extrusion is hole_N_csk_d and hole_N_csk_angle; vertical corners of that Z extrusion that share one radius are outline_fillet_r), and a small boolean of those extrusions. Parameter names match the CadQuery script (hole_1_d, hole_row_1_n, hole_circle_1_r, slot_1_len, boss_1_h, fillet_r, edge_fillet_r, leg_x, base_hole_1_d, 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. |
| to_freecadB | Write an editable parametric FreeCAD macro (.FCMacro) 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, edge_fillet_r when every edge of the box shares one radius (a through-hole that clears those rounds is cut after the fillet, and a straight boss that clears them is fused after it), fillet_r on every vertical edge of an L-bracket including the inner corner (leg_x, leg_y), through-holes in the foot and the upright of that bracket (base_hole_N_d, leg_hole_N_d), a row, axis-aligned grid, or bolt circle of plain Z through-holes (hole_row_1_n, hole_row_1_pitch, hole_grid_1_nx, hole_circle_1_n, hole_circle_1_r), a straight obround through-slot along Z (slot_1_len, slot_1_w, slot_1_angle), 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 (straight round bosses on the top face of a Z extrusion are boss_N_d, boss_N_h, boss_N_x, boss_N_y; a vertical countersink on that Z extrusion is hole_N_csk_d and hole_N_csk_angle; vertical corners of that Z extrusion that share one radius are outline_fillet_r), and a small boolean of those extrusions. Parameter names match the CadQuery script (hole_1_d, hole_row_1_n, hole_circle_1_r, slot_1_len, boss_1_h, fillet_r, edge_fillet_r, leg_x, base_hole_1_d, boss_1_fillet, extrude_len, ...). Edit one and run the macro in FreeCAD, or with freecadcmd. Returns the parameters, whether freecadcmd verified the macro against the mesh, and the measured deviation when it did. Without freecadcmd the same deviation and volume check is run with CadQuery, or with OpenSCAD when CadQuery is not installed. The macro is written only when that check passes, and verified is false because FreeCAD did not measure it. Returns an "error" key when the part is outside that vocabulary or the check refuses. |
| list_paramsA | List the editable parameters of a CadQuery, OpenSCAD, or FreeCAD script mesh2cad generated. Args: script_path: path to a .py, .scad, or .FCMacro file written by mesh2cad. Returns name, value, kind, and unit for each parameter. Outline and cutout point lists are included and are not single numbers. Returns an "error" key when the file is not a script mesh2cad generated. |
| edit_paramsA | Change named parameters in a script mesh2cad generated and re-render the solid. Args: script_path: path to a .py, .scad, or .FCMacro file written by mesh2cad. changes: mapping of parameter name to a new number, or to a string that starts with + or - to add that delta (for example {"hole_1_d": 8, "base_x": "+2"}). output_path: STEP or STL to write. CadQuery and FreeCAD accept .step or .stl. OpenSCAD accepts .stl. When omitted, a .step (or .stl for OpenSCAD) is written next to the script if that backend is available. The script is updated in place. Every byte outside the replaced numbers stays the same. Unknown names are refused with the valid list. An edit that does not produce one valid solid, or a hole larger than the wall it sits in, is refused and nothing is written. Returns old and new values, the rendered path, validity, volume and bounding-box delta, and warnings. Returns an "error" key when the edit is refused or the backend needed for output_path is not available. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 8 tools
The core operations are clearly distinct: analyze (surface report only), convert (mesh→STEP B-rep), the three to_* tools (parametric script generation), and edit_params/list_params operate on already-generated scripts. The three to_* backends are explicitly described as producing 'same parts as to_cadquery', so the boundary is the backend, which is unambiguous. Minor overlap: 'report' and the fidelity report returned by 'convert' both cover the same conversion assessment, and a user could be unsure which to call first.
Three conventions coexist: bare verbs (analyze, convert, report), to_noun backend variants (to_cadquery, to_openscad, to_freecad), and verb_noun parameter tools (edit_params, list_params). Each group is internally consistent and readable, but the set as a whole mixes patterns rather than following one verb_noun scheme.
Eight tools is well-scoped for a mesh-to-CAD conversion server: one analysis, one direct conversion, three backend script writers, two parameter tools, and one report. No tool appears redundant given the multi-backend design.
The surface covers the full lifecycle: analyze the mesh, convert directly, generate editable scripts in three backends, list and edit parameters, and report fidelity. Minor gaps remain—there is no tool to validate or re-check an existing STEP/script against the mesh outside edit_params, and no batch/multi-part operation—but core workflows are fully covered.