Skip to main content
Glama

Sheet Refold

sheet_refold

Refold a sheet-metal flat pattern and compare the resulting solid to the original part within volume and bounding-box tolerances to catch incorrect bend allowances, angles, or directions.

Instructions

Fold a flat pattern back up and check it reproduces the part — the other half of the unfold gate.

This does NOT replay the feature model. It reads the flat pattern back: each leg length is measured off the flat outline, walking outward from the bend's attachment past its reported bend allowance to the far edge of that region. So a wrong allowance, angle or bend direction lands the refolded solid somewhere the original is not, and this reports the disagreement instead of hiding it.

handle: a sheet part to unfold and then refold. flat: alternatively a sheet_unfold report, to refold a development produced elsewhere (or a deliberately corrupted one, to prove the check bites). compare: the handle to check against; defaults to handle, and is skipped when only flat is given. volume_tol_pct / bbox_tol_mm: agreement tolerances.

Note the round trip that is meaningful and the one that is not: refold-vs-folded must match, but flat-vs-folded VOLUME must not, and does not. Bending preserves neutral-fibre length, not material volume — a bend sector's true volume is angle·t·(R + t/2)·w while its flat footprint is angle·(R + K·t)·t·w, and those agree only at K = 0.5.

Returns {handle, name, volume_mm3, bbox, bends, compare?} where compare is {handle, matches, volume_mm3, volume_error_pct, bbox_max_error_mm, tolerance}.

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

Input Schema

NameRequiredDescriptionDefault
flatNo
nameNoSheetRefold
handleNo
compareNo
k_factorNo
workspaceNoRun this call in this named workspace
bend_tableNo
bbox_tol_mmNo
volume_tol_pctNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.7
    • addedInput schema / properties / workspace
      Added value: +{
      +  "default": "",
      +  "description": "Run this call in this named workspace",
      +  "title": "Workspace",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Goes well past the annotations by disclosing the internal method (no feature-model replay; leg lengths measured off the flat outline past the reported bend allowance) and explaining that a wrong allowance, angle or direction surfaces as a reported disagreement rather than being hidden. It also pre-empts a likely misinterpretation by stating that flat-vs-folded volume must NOT match while refold-vs-folded must, with the K=0.5 rationale. The return shape is spelled out explicitly.

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?

Front-loaded with the core purpose and the 'does NOT replay the feature model' caveat, and parameter notes follow in a compact block. The neutral-fibre volume derivation is the longest digression but earns its place by preventing a false failure interpretation; still, it could be tightened to a single clause.

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

Completeness4/5

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

Strong overall for a 9-parameter tool with no output schema: it documents the return object including the nested `compare` fields (matches, volume_error_pct, bbox_max_error_mm, tolerance). The gap is the unexplained `k_factor` and `bend_table` inputs, which an agent would otherwise have to guess at.

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

Parameters3/5

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

Schema coverage is only 11% (just `workspace`), so the description must carry the load; it explains `handle`, `flat`, `compare`, and both tolerance parameters well. However, `k_factor` and `bend_table` — two of the nine parameters and arguably the most consequential for bend math — are never mentioned, despite the description discussing K factors at length. `name` is also undocumented.

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?

States a specific verb+resource ('fold a flat pattern back up and check it reproduces the part') and immediately frames itself as 'the other half of the unfold gate,' which cleanly separates it from the sheet_unfold sibling. An agent knows exactly what operation this is without opening the schema.

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?

Gives explicit routing for the two entry modes: use `handle` for a sheet part to unfold-then-refold, or `flat` to refold a development produced elsewhere (including a corrupted one 'to prove the check bites'), with `compare` defaulting to `handle` and skipped when only `flat` is given. It does not explicitly say when to prefer this over sheet_check or sheet_flat_export, so the sibling exclusion is implied rather than stated.

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

Deploy Server

Other Tools