Skip to main content
Glama

to_cadquery

Converts a mesh into an editable parametric CadQuery script with named dimensions, returning the parameters and the measured deviation between the script output and the original mesh.

Instructions

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), 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, 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.

Input Schema

NameRequiredDescriptionDefault
tolNo
input_pathYes
output_pathNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.12.0

TDQS

B3.1/5.0
Behavior3/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 disclose meaningful behavior: the output is an editable, re-runnable script, the return includes parameters plus 'measured deviation of the script's output from the mesh', and an 'error' key signals out-of-vocabulary parts. Still missing: what the input model must be, whether the script is written to output_path, and what tolerance/validation is applied.

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?

Purpose is front-loaded in sentence one and the remaining text is dense capability scoping rather than filler. The repeated axis clauses ('along X, Y, or Z' three times) and deep parenthetical nesting make it a heavy read, but each clause constrains what geometry is supported, which is genuinely load-bearing.

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

Completeness2/5

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

This is a conversion/generation tool with 3 undocumented parameters and no output schema. The description explains the shape of the return value but leaves the entire input contract (file type of input_path, meaning of tol and output_path, error handling for bad paths) unspecified — a significant gap for a tool the agent must invoke correctly on the first try.

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

Parameters2/5

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

Schema description coverage is 0% for all three parameters, so the description must compensate and does not: input_path (required), output_path, and tol are never mentioned. The one concrete example ('hole_1_d = 6.0, extrude_len') describes the *output* parameters of the generated script, not the tool's inputs, so the agent gets no help on what file format input_path expects or what tol means.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb+artifact: 'Write an editable parametric CadQuery script (.py) for a simple part.' The target format (CadQuery .py) inherently distinguishes it from siblings to_openscad and to_freecad, though it never names them. The capability vocabulary enumeration further pins down exactly what 'simple part' means.

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?

The long vocabulary list ('box/plate base with rectangular pads, holes... bosses... fillets...') plus 'Returns an "error" key when the part is outside that vocabulary' implicitly tells the agent when this tool will succeed versus fail. However, it never explicitly says when to pick this over to_openscad or to_freecad, or what to do on the error path.

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