Skip to main content
Glama

ParCAD

Build and measure a part

evaluate_part
Read-only

Build a part from a parcad DSL script, or a saved project without sending it, and report what the kernel built. The reply opens with the verdicts: the part's own checks (read checks.verdict first), brief (what the part is for, judged on the build: write brief({ envelope: [x, y, z] }) in the first build), and print_check — loose pieces, thin walls (failed under 0.3 mm, which export_part and save_project refuse without allow_failing), cuts into another feature, overhang. Then size, volume, area, faces, edges, bodies (free-standing pieces: one for a part), voids, stands_on, tags and tag_extents.

Read tag_extents before any picture: it is the only number that says whether a feature is where you meant it, since every other one is unchanged when a feature faces the wrong way. Compare each tag's center with the part's centroid and with the script; a tag in unlocated_tags owns no face of the finished part.

A part in several solids returns named shapes, return { base, lid }: named_bodies measures each alone (pieces above 1 is a body its own booleans split) and between_bodies each pair on the exact solids — clear with clearance_mm, touching with contact_mm2, interfering with depth_mm. Read the depth and the contact, not the verdict. Bodies are never fused; selectors and treatments work inside one body. .reference() marks a body that is not the part, such as the coins it holds: measured against every body, left out of size, volume, the print check and exports. A reply lists at most 6 bodies and 16 pairs, the deepest interference first; named_bodies_unlisted and between_bodies_unlisted count the rest, and bodies: [names] lists those. Checks, motion and mechanisms are written in the script (read_docs dsl Check, TurnCheck, Mechanism): { clear: ["lid", "base"], atLeast: 0.2 } holds at one pose, { turns: { body, about, at, degrees }, clearOf: ["base"], atLeast: 0.3 } over a whole travel. A failed check never stops this tool.

Pass views (iso, front, top, …) to see it too; each view carries scale_mm over scale_px and path, and size is still the number to quote. Pass section: { axis, at_mm } with a view to cut it open: the flat orange is material the plane passed through, anything darker inside it is void, and cut_fraction 0 means the plane missed. To show the user the part, save_project and open_project it.

edits with project builds it with lines changed and nothing saved — 'what if the wall were 1.2 mm' in one call; edit_part is the tool that saves. A build is kept per script, so asking again with views reuses it; timeout_s gives a heavy part longer than 20 s.

A surface (surfaceLoft, trim, patch, …) reports kind: "surface" and surface — area, free_edges, boundary_loops — instead of a volume; .thicken(t) makes it a solid. Curved outlines are drawn, never faked with short straight edges: a section entry { through }, { radius }, { spline }, { fit, tolerance } or { curve: (t) => [x, y], from, to, tolerance }, and spurGearOutline for a gear (read_docs dsl SectionEntry); deviation_mm and curve_bound_mm measure what was built.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "evaluate_part"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagsNoList only these tags in `tag_extents`, the cuts into them in `collisions`, and their colours in a `regions` view.
editsNoChanges to build with, in order, each { old, new } replacing text that appears exactly once. Nothing is written back; edit_part saves.
viewsNoAlso draw the part from these viewpoints: `iso`, `front`, `back`, `left`, `right`, `top`, `bottom`, all in one framing. The names are absolute, not part-relative — `front` looks along +Y whatever way the part is turned — and each view's `axes` says in one sentence what it looks along and which way is up.
bodiesNoFor a part in several bodies, after a reply without it: list only these in `named_bodies` and `print_check.bodies`, and only the pairs with one of them in `between_bodies`, pairs of two of them first. A reply already lists every interference first; name bodies to see what `between_bodies_unlisted` counted.
scriptNoA parcad DSL script that returns a shape, `return body.cut(hole)`, or named shapes, `return { base, lid }`. Millimetres; primitives are centred on the origin and placed with `.at(x, y, z)`. Give this or `project`.
projectNoA saved part to build without sending it, as list_projects spells it, or "@session" for the script on the user's screen.
regionsNoColour each view by the tag that owns the surface instead of shading it, and name every tag's colour and share, `visible: false` for one hidden from that angle. A face takes the tag nearest the node that made it: a tag inside a union, or on a moved or mirrored copy, wins.
sectionNoCut the part open on a plane for the views; the part and every measurement stay whole.
materialsNoDraw each face in its `.material()` colour instead of grey.
timeout_sNoSeconds the kernel may take, 1 to 600; defaults to 20. A finished build is kept, so asking again does not wait again. A script's own work is raised with `scriptBudget(n)` in the script.
image_sizeNoPixels per side, 128 to 1024. Defaults to 512.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, and the description adds real behavioral context: a failed check never stops the tool, builds are cached per script, `timeout_s` defaults to 20 s and caps at 600, replies truncate at 6 bodies and 16 pairs with `*_unlisted` counters, `.reference()` bodies are excluded from size/volume/print check/exports, and export_part/save_project refuse thin walls without `allow_failing`. It stops short of describing the full reply envelope structure, which keeps it off a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded in the first sentence, but the body is a dense ~450-word block mixing measurement reading, multi-body semantics, DSL syntax, surface handling and curve outlines with no structure beyond backticked prose. Most sentences carry substantive guidance, yet several (the whole `SectionEntry`/curve-outline paragraph) belong in documentation rather than a tool 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, so the description carries the full burden of describing the reply, and it does: verdict order (`checks`, `brief`, `print_check`), measurement fields (`size`, `volume`, `bodies`, `voids`, `stands_on`, `tag_extents`), `named_bodies`/`between_bodies` shapes, and the `kind: "surface"` alternative. Nothing an agent needs to interpret the result is missing.

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 baseline is 3; the description goes beyond it by explaining consequences of parameters rather than restating them — that `section` cuts only the picture while the part and every measurement stay whole, that each view carries `scale_mm`/`scale_px`/`path`, that `edits` writes nothing back, and that `bodies: [names]` reveals what `between_bodies_unlisted` counted.

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?

Opens with a specific verb and resource: 'Build a part from a parcad DSL script, or a saved `project` without sending it, and report what the kernel built.' It also draws the boundary against the saving sibling ('edit_part is the tool that saves') and the presentation siblings ('save_project and open_project it'), so an agent can pick this over `edit_part` or `export_part` without opening schemas.

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?

Gives explicit when-to-use and when-not rules: use `edits` with `project` for a what-if that saves nothing versus edit_part which saves, and use save_project/open_project to show the user the part. It also routes to `read_docs dsl` for Check/TurnCheck/Mechanism syntax and tells the agent to re-ask with `views` because builds are cached per script.

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.