Skip to main content
Glama

KinetiCAD CNC Parts

Build and check a part

build_part

Build one part from CadQuery code in KinetiCAD's CAD kernel and check that it is a solid a shop can machine. Returns a part_id, the measured size and volume, every round hole and round outside surface with its diameter and direction, warnings (for example a cut that removed nothing), a picture, and a link where the user can rotate the part in 3D. The code runs in a sandbox with only cadquery (as cq) and math. Leave the finished solid in a variable named result, or pass it to show_object(). Units are millimeters. The part must be ONE closed solid, at most 1000 mm long. A cavity sealed inside the material is rejected, because no cutter can reach it. The code can be up to 20000 characters long. Optional: define PARAMS (a list of {name, label, unit, value, min, max}) and a function build(p) that returns the solid. The user can then change those dimensions on the part's page. If the build fails, the error says what is wrong and on which line: fix the code and call again. Parts are kept for 30 days.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "cadquery": "<cadquery>"
    },
    "name": "build_part"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoShort name of the part, for example: Motor bracket.
aboutNoOne sentence on what the part is for. The KinetiCAD team sees it with an order request.
cadqueryYesCadQuery (Python) code for one part, in millimeters.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, openWorldHint=true, idempotentHint=false), the description discloses the sandbox module allowlist (`cadquery` as `cq`, `math`), the required output convention (`result` variable or `show_object()`), unit assumptions, the 20000-character code cap, the 30-day retention window, and the exact failure mode with line-numbered errors. That is substantial operational context an agent could not get from structured fields.

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 return payload is front-loaded and each sentence carries a distinct constraint or behavior, so nothing is padding. It reads as one dense block rather than being chunked into build requirements versus output format, which slightly hurts scanability for a long description.

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?

There is no output schema, and the description compensates fully by enumerating the return contents (part_id, size, volume, holes and their diameters/directions, warnings, picture, 3D link). Combined with the sandbox and geometry constraints, an agent has everything needed to call this correctly on the first attempt.

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?

Schema coverage is 100%, so the schema already documents all three parameters and the baseline is 3. The description adds real meaning for the critical `cadquery` parameter — what the code must leave behind, what it may import, and the optional PARAMS/build(p) convention that unlocks editable dimensions — though it says nothing extra about `name` or `about` beyond the schema.

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?

"Build one part from CadQuery code in KinetiCAD's CAD kernel and check that it is a solid a shop can machine" states a specific verb (build + check), the resource (one part), the input modality (CadQuery code), and the validation goal. This is unmistakably distinct from siblings like price_part, view_part, and request_order.

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

Usage Guidelines4/5

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

It gives concrete preconditions (one closed solid, at most 1000 mm, no sealed cavities) and a retry loop: on failure, read the line-numbered error, fix the code, and call again. What it lacks is an explicit statement of the downstream path (e.g. call view_part or price_part after a successful build), so the agent must infer ordering from sibling names.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources