Skip to main content
Glama

measure_surface

Trace an open wall run in plan view to compute surface area as traced length × wall height for wall tile, wainscot, and wall system takeoffs.

Instructions

Surface Area — wall SF (#146): trace an OPEN run along the wall in plan view (min 2 points, image px) and the quantity is traced LF × height. This is how wall tile, wainscot, and wall systems are taken off — the quantity family measure_polygon cannot produce. Height lives on the CONDITION (the canvas's H knob): pass height_ft to set it on this call (journals as its own undo step, like typing H before tracing), or set it once with edit_condition; with neither, this refuses and mints nothing. The shape snapshots the height it was quantified at. Requires the sheet's scale. 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.

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": {
      "sheet": "<sheet>",
      "pts": "<pts>",
      "condition": "<condition>"
    },
    "name": "measure_surface"
  }
}

Input Schema

NameRequiredDescriptionDefault
ptsYesThe wall run, an open polyline (image px)
sheetYes
conditionYesFinish tag to commit under (minted on first use), e.g. 'CT-W1'
height_ftNoWall height in feet — written to the condition's H knob first, then used
arc_throughNoIndices of points that are the MIDDLE of an arc: the trace runs the point before → this point → the point after as the unique circle through the three (the canvas's Curve mode). For a curved wall put one point anywhere ON the bow between its two ends and mark it. The arc is baked to ordinary vertices on commit and origin.curved is stamped; a mark on an end of an open run, or two marks in a row, refuses.

Output Schema

NameRequiredDescriptionDefault
arcsNoHow many arc_through bows were laid — present only when the trace was bent; the vertices reported are the baked arc, not the three points you gave
nptsYes
area_sfYeslength_lf × height_ft — the wall SF committed
shape_idYes
conditionYes
height_ftYesThe height this shape was quantified at (snapshotted on the shape)
length_lfYesThe traced run's open length

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv0.1.31
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / arc_through / items / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / pts / items / additionalItems
      Added value: +false
    • addedOutput schema / properties / arcs / maximum
      Added value: +9007199254740991
    • addedOutput schema / properties / arcs / minimum
      Added value: +-9007199254740991
    • addedOutput schema / properties / npts / maximum
      Added value: +9007199254740991
    • addedOutput schema / properties / npts / minimum
      Added value: +-9007199254740991
  2. Changed2 schema fields changedv0.1.24
    • addedInput schema / properties / arc_through
      Added value: +{
      +  "description": "Indices of points that are the MIDDLE of an arc: the trace runs the point before → this point → the point after as the unique circle through the three (the canvas's Curve mode). For a curved wall put one point anywhere ON the bow between its two ends and mark it. The arc is baked to ordinary vertices on commit and origin.curved is stamped; a mark on an end of an open run, or two marks in a row, refuses.",
      +  "items": {
      +    "minimum": 0,
      +    "type": "integer"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / arcs
      Added value: +{
      +  "description": "How many arc_through bows were laid — present only when the trace was bent; the vertices reported are the baked arc, not the three points you gave",
      +  "type": "integer"
      +}
  3. Addedv0.1.9

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full load and does so: it discloses the refusal behavior ('refuses and mints nothing'), the undo/journal semantics of height_ft ('journals as its own undo step'), the snapshot of height onto the shape, the scale precondition, the coordinate space (px at render scale 2.0, PDF pt × 2, top-left origin, y down), and the arc baking/stamping plus refusal cases for invalid marks. This is well beyond what a bare signature conveys.

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 purpose and price-of-admission statement are front-loaded, and nearly every clause carries information. It is dense and parenthetical ('the canvas's H knob', 'the browser canvas's native space', coordinate conversion details) in ways that add bulk for an agent that mostly needs the preconditions and the shape of pts.

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 measurement/mutation tool with a non-obvious precondition and a tricky coordinate space, the description covers preconditions, failure modes, side effects, and undo behavior; return values need not be explained since an output schema exists. Nothing essential to calling it correctly appears to be 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 80%, so baseline is 3, and the description adds real meaning on top: height_ft is written to the condition's H knob first and then used, journals as an undo step, and is snapshotted onto the shape; the coordinate frame and px/pt conversion for pts are not in the schema and are supplied here. The arc_through explanation largely restates its already-detailed schema description, which keeps it below a 5.

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 (trace an OPEN run along the wall in plan view) and a specific quantified resource (wall SF = LF × height), and explicitly contrasts it with the sibling it is not: 'the quantity family measure_polygon cannot produce.' An agent can distinguish measure_surface from measure_line and measure_polygon from the description alone.

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 the use case (wall tile, wainscot, wall systems) and names measure_polygon as the alternative that cannot do it. It also gives explicit conditional routing for the height prerequisite: pass height_ft on this call, or set it once with edit_condition, and states that with neither the call refuses. Both the when-to-use and the when-not path are covered.

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