Skip to main content
Glama

ParCAD

Find the thinnest wall

measure_wall_thickness
Read-only

Find the thinnest material anywhere in the part, and where it is. Use this before saying a part is ready to print, cast or mill, and any time you cut a pocket, a bore or a shell into something — it is the check that catches a wall you thinned without meaning to. Unlike probe_part it needs no guess about where to look: it reads every edge, searches every pair of faces for thin material between them, and measures from thousands of points over the whole surface, and reports the worst.

The thickness at a point is the diameter of the largest ball that fits inside the material touching the surface there — the wall thickness a moulder or a print check means. Through a slanted wall it is the distance across the wall, not along any line: a 2 mm slab tilted 30° reads 2.0 here and 2.31 straight down with probe_part. Use this for how thick a wall is, probe_part for how much material a particular line crosses.

Reports thinnest — the thickness in mm, the point, and surface_of and opposite_surface_of, the tags of the two faces the material lies between, which is what tells you which wall is thin. Pass threshold_mm (the process minimum, e.g. 1.2 for a print) and it also reports below_threshold, how many samples failed it, plus thin_spots: every thin sample grouped into the place it belongs to, with its kind, samples and extent_mm, so a pocket floor thin all over and one thin corner are different entries.

Read kind first. feather is a sliver: real material that thins to a knife edge where two faces meet at a shallow angle, what a cut leaves when it grazes another feature. Its thickness_mm is 0 because the material really does run out to nothing along that edge — it is the thinnest material in the part, not a measuring artefact and not an edge reading — with wedge_deg the angle and extent_mm the stretch that sharp. It will not print or cast cleanly and is almost never intended, so fix it or say why it stays. wall is two faces that do not meet — a floor, a wall, a web between holes — and is thin because a dimension made it so. edge is a ball wedged into a corner — beside every sharp edge, and on every round, which reads twice its radius — so it comes last and is not a wall. surface and opposite_surface say what each face is, which names the feature when no tag does.

Measured on the exact solid with every fillet and chamfer in it: a rounded edge is in the number, not a caveat beside it. What is certain, at any max_samples: every feather is found, however short, and every wall thinner than threshold_mm between two faces that do not meet is found and measured exactly where it is thinnest. Only a thin place of another shape — across a single curved face, like a thin pin — rests on the samples, which are never more than sample_spacing_mm apart; raise max_samples to narrow that. A minimum that tapers toward zero at a groove rim or a run-off blend is real material geometry, not a defect: docs/GOTCHAS.md, in read_docs, has the two shipped parts it happens on. A surface has no material to be thick and is refused here, naming .thicken(t); in a part that mixes solids and surfaces the surfaces are left out and listed in surfaces_skipped.

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": "measure_wall_thickness"
  }
}

Input Schema

NameRequiredDescriptionDefault
editsNoChanges to make before building, in order, each { old, new } replacing text that appears exactly once; nothing is written back.
scriptNoA parcad DSL script ending in a returned shape. Give this or `project`, not both.
projectNoThe part to build instead of sending it, as list_projects spells it, or "@session" for the script on the user's screen.
timeout_sNoSeconds the kernel may take to build and sweep the part, 1 to 600. Defaults to 20, or PARCAD_OCCT_TIMEOUT.
max_samplesNoHow many surface points the sweep measures from, 200 to 100000; the default, 6000, puts one at most about every hundredth of the part's diagonal, and the reply's `sample_spacing_mm` says how far apart they came out. Feathers and walls between faces that do not meet are found at any count; more samples narrow what else can fall between them.
threshold_mmNoWhat counts as too thin, in mm — the process minimum, such as 1.2 for a typical print or 2.5 for a casting. Without it only the thinnest place is reported and nothing is counted.

Output Schema

NameRequiredDescriptionDefault
moreNo
noteYes
unitsYes
samplesYes
thinnestNo
discardedYes
thin_spotsNo
threshold_mmNo
script_sha256Yes
below_thresholdYes
matched_looselyNo
surfaces_skippedNo
sample_spacing_mmYes
unlisted_thin_spotsNo
below_threshold_at_edgesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already mark this as a safe read-only, non-destructive operation, and the description adds substantial behavior beyond them. It explains exact-solid measurement including fillets and chamfers, guarantees for feather and wall detection at any max_samples, sampling limitations for curved-face cases, refusal of surface-only input, and handling of mixed solid/surface parts.

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?

The purpose is front-loaded and the structure is logical, but the description is very long for a tool definition. Much of the detail on kind classification and measurement guarantees is valuable, yet the overall size makes it harder to scan and could likely be tightened or moved to linked documentation.

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?

For a geometrically complex measurement tool with an output schema, the description is complete. It covers purpose, alternatives, thresholds, sampling behavior, output fields, edge cases, and refusal conditions, leaving no major ambiguity for correct invocation.

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, but the description adds meaning beyond the schema for threshold_mm by tying it to the process minimum and to below_threshold and thin_spots results. It also explains the sampling tradeoff for max_samples, though it does not describe every parameter such as edits or project in prose.

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?

The description states a specific verb and resource: it finds the thinnest material anywhere in the part and where it is. It also explicitly distinguishes itself from probe_part, so an agent can select it without opening either schema.

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?

It gives explicit when-to-use guidance: before declaring a part ready to print, cast or mill, and any time a pocket, bore or shell is cut. It also names the alternative probe_part and the exact condition that selects it: probe_part for material crossed by a particular line, this tool for wall thickness.

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.