Skip to main content
Glama

edit_shape

Revise a committed shape without deleting it: move vertices, reassign finish tags, switch measurement role, or set room labels. Quantities and per-room reporting update automatically.

Instructions

REVISE a shape you already committed, instead of deleting it and starting over: pass new verts to move the geometry, condition to reassign it to a different finish tag, role to switch between floor_area / deduct / linear, label to name the room it belongs to, or any combination. Quantities are recomputed from the result — a role flip alone re-measures (closed area vs open length). The loop this is for: measure_polygon to commit, view_sheet with overlay:true to LOOK at what landed, then edit_shape to fix the two vertices that overshot into the corridor. label is the per-room reporting seam: this is how a shape traced by hand — or one whose room number the sweep read wrong — joins the same per-room breakdown the Report and the workbook's floor × room tab group by. Shapes a human affirmed (origin.reviewed) are ink and are refused — an agent revises its own pencil and nothing else. Agent self-revision is tallied on origin.agent_edits, kept deliberately separate from the human-correction fields. 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
roleNoSwitch what the shape measures — flipping INTO surface_area needs a height on the shape or its condition
labelNoThe room (or phase/area) this shape belongs to, e.g. "134" or "OFFICE 101" — what per-room reporting groups by. Pass "" to clear it
vertsNoReplacement geometry (image px): ≥3 vertices for an area shape, ≥2 points for a linear/surface run, ≥1 for a count marker
shape_idYesId returned when the shape was committed
conditionNoReassign to this finish tag (minted on first use)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNocount shapes only — the marker's EA (preserved across the edit)
labelNoThe shape's room/phase label after this call — absent when it carries none (a cleared label reports as absent, not as an empty string)
nvertsYes
area_sfNo0 for linear shapes; LF × height for surface_area; absent for count
changedYesWhich fields this call actually changed
shape_idYes
agent_editsYesHow many times the agent has revised this shape — separate from the human-correction tally
measure_roleYes
perimeter_lfNoLength for linear/surface runs, perimeter for closed ones; absent for count

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.1.14
    • addedInput schema / properties / label
      Added value: +{
      +  "description": "The room (or phase/area) this shape belongs to, e.g. \"134\" or \"OFFICE 101\" — what per-room reporting groups by. Pass \"\" to clear it",
      +  "type": "string"
      +}
    • changedOutput schema / properties / changed / items / enum
      Previous value: -[
      -  "verts",
      -  "condition",
      -  "role"
      -]New value: +[
      +  "verts",
      +  "condition",
      +  "role",
      +  "label"
      +]
    • addedOutput schema / properties / label
      Added value: +{
      +  "description": "The shape's room/phase label after this call — absent when it carries none (a cleared label reports as absent, not as an empty string)",
      +  "type": "string"
      +}
  2. Changed8 schema fields changedv0.1.9
    • changedInput schema / properties / role / description
      Previous value: -"Switch what the shape measures"New value: +"Switch what the shape measures — flipping INTO surface_area needs a height on the shape or its condition"
    • changedInput schema / properties / role / enum
      Previous value: -[
      -  "floor_area",
      -  "deduct",
      -  "linear"
      -]New value: +[
      +  "floor_area",
      +  "deduct",
      +  "linear",
      +  "surface_area",
      +  "count"
      +]
    • changedInput schema / properties / verts / description
      Previous value: -"Replacement geometry (image px): ≥3 vertices for an area shape, ≥2 points for a linear one"New value: +"Replacement geometry (image px): ≥3 vertices for an area shape, ≥2 points for a linear/surface run, ≥1 for a count marker"
    • changedOutput schema / properties / area_sf / description
      Previous value: -"0 for linear shapes"New value: +"0 for linear shapes; LF × height for surface_area; absent for count"
    • addedOutput schema / properties / count
      Added value: +{
      +  "description": "count shapes only — the marker's EA (preserved across the edit)",
      +  "type": "number"
      +}
    • changedOutput schema / properties / measure_role / enum
      Previous value: -[
      -  "floor_area",
      -  "deduct",
      -  "linear"
      -]New value: +[
      +  "floor_area",
      +  "deduct",
      +  "linear",
      +  "surface_area",
      +  "count"
      +]
    • changedOutput schema / properties / perimeter_lf / description
      Previous value: -"Length for linear shapes, perimeter for closed ones"New value: +"Length for linear/surface runs, perimeter for closed ones; absent for count"
    • changedOutput schema / required
      Previous value: -[
      -  "shape_id",
      -  "changed",
      -  "measure_role",
      -  "nverts",
      -  "area_sf",
      -  "perimeter_lf",
      -  "agent_edits"
      -]New value: +[
      +  "shape_id",
      +  "changed",
      +  "measure_role",
      +  "nverts",
      +  "agent_edits"
      +]
  3. Addedv0.1.6

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 burden and does: it discloses that quantities are recomputed on every edit, that a role flip alone re-measures (closed area vs open length), that origin.reviewed shapes are rejected, that agent edits are tallied on origin.agent_edits, and the exact coordinate space (image px, scale 2.0, top-left origin, y down). This is exactly the behavioral context annotations would otherwise provide.

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?

Purpose and the refusing-rule are front-loaded and every sentence carries operational content, but the 'ink vs pencil' metaphor and the density of the run-on middle sentence cost some clarity. Efficient overall, small flourish.

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?

A complex mutation tool with an output schema (so return values need no explanation) and full schema coverage; the description still fills the gaps that matter — recompute behavior, refusal conditions, edit accounting, and coordinate conventions. Nothing an agent needs to call it correctly is 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 baseline is 3, but the description adds genuine meaning beyond the schema: it frames each parameter by consequence (verts move geometry, condition reassigns finish, role switches measurement mode, label is the per-room reporting seam) and explains the downstream effect of a role flip. It stops short of adding syntax details the schema already provides.

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 (REVISE) and resource (a committed shape), and explicitly distinguishes it from the delete-and-recreate path plus the sibling delete_shape. An agent can tell exactly what this does from the first clause.

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?

Names the exact workflow loop — measure_polygon to commit, view_sheet overlay:true to inspect, then edit_shape to fix overshooting vertices — and states the boundary condition that reviewed (human-affirmed) shapes are refused. Usage and exclusions are both explicit.

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