Skip to main content
Glama

cut_out

Creates a real hole in a committed floor area shape or clips an open run. Use it for columns, drains, or islands inside a room while keeping takeoff totals reconciled.

Instructions

Cut a REAL hole in a committed floor_area shape (#206) — the way the canvas cuts one (#137): the same lib/cutout.js boolean subtract, so the two surfaces can never disagree about what a hole holds. The parent keeps its outer ring plus the reconciled hole(s) (verts_norm_holes), its computed nets for real — N cuts compose, overlap between cuts never double-deducts (set subtraction), a hole ADDS perimeter — and the deduct commits carrying cuts_shape_id so the report and legend read the reconciled number, never a second arithmetic pass. This is the verb for a column, a floor drain, an island of casework INSIDE a room; an independent measure_polygon role:"deduct" stays the tool for a deduction that isn't a hole in one parent. Refusal over guessing: the ring must sit FULLY inside the parent's outer ring (an edge-crossing cut is a boundary correction — edit_shape the parent instead), and a cut that would erase the parent or split it in two refuses whole (trace the pieces as rooms). One journal entry — undo_last restores parent and hole together; delete_shape on the deduct later reverts the cut too (a multi-cut parent rebuilds from the chain's pristine snapshot minus the survivors). AN OPEN RUN IS CLIPPED, NOT SUBTRACTED: wall tile (surface_area) and base/transitions (linear) are polylines traced in plan, so the ring removes the stretch it covers, the run keeps its id and takes what survives, and a cut through the MIDDLE leaves the far side as its own shape (same condition, same height) — quantities ride the surviving length, which is exact, since wall SF is LF × height and a border's SF is LF × thickness. No deduct is minted for a run: there is no area for one to sit on, and a deduct's SF counts against the FLOOR total a run never fills. A ring that misses the run, one that swallows it whole (delete_shape it), and a curved run (its verts are control points) all refuse. A derived base with numeric openings also refuses: those deductions have no stored location; use measure_line for installed runs so a geometric cut cannot erase the numeric allowance. Coordinates are image px at render scale 2.0: PDF pt × 2, origin top-left, y down (the browser canvas's native space). Sheet payloads carry dims in both px and pt.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
vertsYesThe ring, image px — fully inside the parent for an area; over the stretch to remove for a run
parent_shape_idYesA committed floor_area shape id, or an open run (surface_area / linear) to clip (list_shapes)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteYes
holesNoArea parent: holes the parent now carries
piecesNoRun parent: every stretch that survived the cut — more than one when the ring fell in the middle
hole_sfNoArea parent: what this cut actually removed from the parent's net — 0 when the ring fell entirely inside an existing hole
shape_idNoRun parent: the run that was clipped — it keeps its id and takes the first surviving stretch
parent_netNo
removed_lfNoRun parent: length the cut took out
removed_sfNoRun parent: the SF that rode on that length
measure_roleNoRun parent: surface_area or linear
deduct_shape_idNoArea parent: the reconciled deduct — carries cuts_shape_id; totals skip it (the parent nets the hole)
parent_shape_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed11 schema fields changedv0.1.19
    • changedInput schema / properties / parent_shape_id / description
      Previous value: -"A committed floor_area shape id (list_shapes)"New value: +"A committed floor_area shape id, or an open run (surface_area / linear) to clip (list_shapes)"
    • changedInput schema / properties / verts / description
      Previous value: -"The hole's ring, image px, fully inside the parent"New value: +"The ring, image px — fully inside the parent for an area; over the stretch to remove for a run"
    • changedOutput schema / properties / deduct_shape_id / description
      Previous value: -"The reconciled deduct — carries cuts_shape_id; totals skip it (the parent nets the hole)"New value: +"Area parent: the reconciled deduct — carries cuts_shape_id; totals skip it (the parent nets the hole)"
    • changedOutput schema / properties / hole_sf / description
      Previous value: -"What this cut actually removed from the parent's net — 0 when the ring fell entirely inside an existing hole"New value: +"Area parent: what this cut actually removed from the parent's net — 0 when the ring fell entirely inside an existing hole"
    • changedOutput schema / properties / holes / description
      Previous value: -"Holes the parent now carries"New value: +"Area parent: holes the parent now carries"
    • addedOutput schema / properties / measure_role
      Added value: +{
      +  "description": "Run parent: surface_area or linear",
      +  "type": "string"
      +}
    • addedOutput schema / properties / pieces
      Added value: +{
      +  "description": "Run parent: every stretch that survived the cut — more than one when the ring fell in the middle",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "lf": {
      +        "description": "This piece's own length",
      +        "type": "number"
      +      },
      +      "sf": {
      +        "description": "LF × the height (wall) or the thickness (border) it was measured at",
      +        "type": "number"
      +      },
      +      "shape_id": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "shape_id",
      +      "lf",
      +      "sf"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / removed_lf
      Added value: +{
      +  "description": "Run parent: length the cut took out",
      +  "type": "number"
      +}
    • addedOutput schema / properties / removed_sf
      Added value: +{
      +  "description": "Run parent: the SF that rode on that length",
      +  "type": "number"
      +}
    • addedOutput schema / properties / shape_id
      Added value: +{
      +  "description": "Run parent: the run that was clipped — it keeps its id and takes the first surviving stretch",
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "deduct_shape_id",
      -  "parent_shape_id",
      -  "hole_sf",
      -  "parent_net",
      -  "holes",
      -  "note"
      -]New value: +[
      +  "note"
      +]
  2. Addedv0.1.15

TDQS

A4.7/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full burden; it discloses mutation semantics, one journal entry, undo_last behavior, delete_shape reverting the cut, multi-cut rebuild from the pristine snapshot, and multiple refusal rules. It also explains clipping versus subtracting for open runs and exact quantity effects, which is far beyond what structured fields provide.

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?

Front-loads the core purpose, but the description is far longer than typical and packed with parenthetical references, asides, and repeated framing. Much content is substantive for a complex tool, yet the density and length hurt scannability, making it only adequately concise.

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?

Given the absence of annotations and the tool's complexity, the description covers behavior, refusals, undo semantics, alternatives, and coordinate space exhaustively. An output schema exists, so return values need not be described; nothing critical seems 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 schema already documents verts and parent_shape_id. The description adds valuable coordinate-frame semantics (image px at render scale 2.0, PDF pt × 2, origin top-left, y down) and distinguishes area cuts from run clipping, going meaningfully 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?

States a specific verb and resource: cutting a real hole in a committed floor_area shape or clipping an open run. It explicitly differentiates from measure_polygon role:'deduct' and edit_shape for boundary corrections, so an agent can identify the tool without opening sibling 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?

Explicit when-to-use guidance: column, floor drain, island of casework inside a room; names measure_polygon as the alternative for independent deductions. It also lists refusal conditions and alternative tools (edit_shape the parent, trace pieces as rooms, use measure_line), giving clear routing.

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