Skip to main content
Glama

measure_line

Measure open polyline paths in image pixels at the sheet scale to calculate linear length and optionally commit them to a condition, including rise/drop or arc points for vertical or curved runs.

Instructions

Measure an open polyline (min 2 points, image px): length_lf at the sheet's scale. Requires the scale to be set. Pass condition to commit it as a linear shape (base, transitions, feature strips, conduit and home runs). A curved run (base along a radius wall, a curved feature strip) takes arc_through: one point on the bow, marked. DROP AND RISE (#441): a plan trace is the flat X–Y path; the material also travels VERTICALLY — a home run drops from the ceiling to a panel, rises to a box. length_lf is the TOTAL: plan + rise + drop. The condition's rise_ft / drop_ft (edit_condition) are the defaults for every run under it; pass rise_ft / drop_ft here to give THIS run its own legs (0 included — "no drop on this one" is a statement), and the reply splits plan_lf / vertical_lf beside the total when a leg exists. 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>"
    },
    "name": "measure_line"
  }
}

Input Schema

NameRequiredDescriptionDefault
ptsYes
sheetYes
drop_ftNoThis run's vertical leg DOWN, in feet, added to its plan length — overrides the condition's drop_ft default for this run (0 = no drop here, whatever the default)
rise_ftNoThis run's vertical leg UP, in feet, added to its plan length — overrides the condition's rise_ft default for this run (0 = no rise here, whatever the default)
conditionNo
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
drop_ftNoThe drop this run resolved to — present with vertical_lf
plan_lfNoThe flat X–Y trace alone — present only when the run carries a vertical leg
rise_ftNoThe rise this run resolved to (its own, else the condition default) — present with vertical_lf
shape_idNoPresent when condition was passed and the shape committed
length_lfYesThe run's TOTAL length: plan trace + rise + drop (#441)
vertical_lfNorise_ft + drop_ft — present only when a leg exists

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. Changed7 schema fields changedv0.1.25
    • addedInput schema / properties / drop_ft
      Added value: +{
      +  "description": "This run's vertical leg DOWN, in feet, added to its plan length — overrides the condition's drop_ft default for this run (0 = no drop here, whatever the default)",
      +  "minimum": 0,
      +  "type": "number"
      +}
    • addedInput schema / properties / rise_ft
      Added value: +{
      +  "description": "This run's vertical leg UP, in feet, added to its plan length — overrides the condition's rise_ft default for this run (0 = no rise here, whatever the default)",
      +  "minimum": 0,
      +  "type": "number"
      +}
    • addedOutput schema / properties / drop_ft
      Added value: +{
      +  "description": "The drop this run resolved to — present with vertical_lf",
      +  "type": "number"
      +}
    • addedOutput schema / properties / length_lf / description
      Added value: +"The run's TOTAL length: plan trace + rise + drop (#441)"
    • addedOutput schema / properties / plan_lf
      Added value: +{
      +  "description": "The flat X–Y trace alone — present only when the run carries a vertical leg",
      +  "type": "number"
      +}
    • addedOutput schema / properties / rise_ft
      Added value: +{
      +  "description": "The rise this run resolved to (its own, else the condition default) — present with vertical_lf",
      +  "type": "number"
      +}
    • addedOutput schema / properties / vertical_lf
      Added value: +{
      +  "description": "rise_ft + drop_ft — present only when a leg exists",
      +  "type": "number"
      +}
  3. 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"
      +}
  4. Addedv0.1.2
  5. Removedv0.1.1
  6. First observed

TDQS

A4.2/5.0
Behavior4/5

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

No annotations exist, so the description carries the full load, and it does disclose real behavior: commit mutates state, arcs are baked to ordinary vertices and origin.curved is stamped, and specific inputs are refused ('a mark on an end of an open run, or two marks in a row, refuses'). It also defines the coordinate frame precisely. It does not say whether a commit is reversible or undoable, which matters for a write path.

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, which is good, but the DROP AND RISE block is long and largely restates what the schema already documents for rise_ft/drop_ft, complete with parenthetical commentary. ALL-CAPS labels and an issue reference ('#441') add noise for an agent reader.

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?

For a 6-parameter mutating measurement tool with an output schema, the definition covers geometry input, arc semantics, vertical-leg math, and the plan_lf/vertical_lf reply split. What remains unstated is the commit's side effects (where the created shape appears, how it relates to edit_shape/undo_last) and failure modes beyond arc marks.

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?

With only 50% schema coverage, the description compensates well: it explains that rise_ft/drop_ft default from the condition and that passing 0 is a meaningful override ('is a statement'), and it states the coordinate convention (image px, render scale 2.0, PDF pt × 2, origin top-left, y down). arc_through gains real meaning ('one point on the bow, marked'). Only the 'sheet' identifier is left without added context.

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 ('Measure an open polyline ... length_lf at the sheet's scale') and the 'open polyline, min 2 points' phrasing separates it from the area-based siblings like measure_polygon and measure_surface. The commit path ('Pass condition to commit it as a linear shape') clarifies the two operating modes in the opening lines.

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 a hard prerequisite ('Requires the scale to be set') and the condition that turns a measurement into a committed shape, plus a rule for when to use arc_through (curved runs). It never names an alternative tool such as measure_polygon for closed areas, so routing between siblings is still left to inference.

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