Skip to main content
Glama

edit_shape

Fix takeoff shape mistakes by revising committed geometry: move vertices, switch role, reassign finish, or set room label; quantities recalculate 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
drop_ftNoLinear runs only (#441): this run's vertical leg DOWN in feet, overriding the condition's drop_ft default (0 = none). null clears the override so the condition's default applies again
rise_ftNoLinear runs only (#441): this run's vertical leg UP in feet, overriding the condition's rise_ft default (0 = none). null clears the override so the condition's default applies again. perimeter_lf is recomputed as plan + rise + drop
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
plan_lfNoLinear runs with a vertical leg: the flat trace alone (#441)
shape_idYes
agent_editsYesHow many times the agent has revised this shape — separate from the human-correction tally
vertical_lfNoLinear runs with a vertical leg: rise + drop (#441)
measure_roleYes
perimeter_lfNoLength for linear/surface runs (a linear run's TOTAL incl. rise + drop), perimeter for closed ones; absent for count

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.1.25
    • addedInput schema / properties / drop_ft
      Added value: +{
      +  "anyOf": [
      +    {
      +      "minimum": 0,
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Linear runs only (#441): this run's vertical leg DOWN in feet, overriding the condition's drop_ft default (0 = none). null clears the override so the condition's default applies again"
      +}
    • addedInput schema / properties / rise_ft
      Added value: +{
      +  "anyOf": [
      +    {
      +      "minimum": 0,
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Linear runs only (#441): this run's vertical leg UP in feet, overriding the condition's rise_ft default (0 = none). null clears the override so the condition's default applies again. perimeter_lf is recomputed as plan + rise + drop"
      +}
    • changedOutput schema / properties / changed / items / enum
      Previous value: -[
      -  "verts",
      -  "condition",
      -  "role",
      -  "label"
      -]New value: +[
      +  "verts",
      +  "condition",
      +  "role",
      +  "label",
      +  "rise_ft",
      +  "drop_ft"
      +]
    • changedOutput schema / properties / perimeter_lf / description
      Previous value: -"Length for linear/surface runs, perimeter for closed ones; absent for count"New value: +"Length for linear/surface runs (a linear run's TOTAL incl. rise + drop), perimeter for closed ones; absent for count"
    • addedOutput schema / properties / plan_lf
      Added value: +{
      +  "description": "Linear runs with a vertical leg: the flat trace alone (#441)",
      +  "type": "number"
      +}
    • addedOutput schema / properties / vertical_lf
      Added value: +{
      +  "description": "Linear runs with a vertical leg: rise + drop (#441)",
      +  "type": "number"
      +}
  2. 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"
      +}
  3. 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"
      +]
  4. Addedv0.1.6

TDQS

A4.6/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 behavioral burden and does so well. It discloses that quantities are recomputed, role flips re-measure, human-approved shapes are refused, agent revisions are tracked on origin.agent_edits, and coordinates use a specific px/pt origin system.

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 description is a single dense paragraph with some verbose asides, such as the lengthy label reporting seam explanation and the sheet payload dimensions sentence. It is appropriately sized for a complex tool, but would benefit from bullet structure or tighter prose.

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?

Given the output schema exists and parameter descriptions cover all 7 fields, the description fills the important gaps: the intended workflow, the refusal of reviewed shapes, coordinate conventions, and reporting semantics. It is nearly complete for an agent to invoke correctly, with minor gaps around error handling.

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?

Even though schema coverage is 100%, the description adds essential semantic context: verts coordinates are image px at render scale 2.0 with origin top-left, label is the per-room reporting seam, and a role flip re-measures. It enriches the ambiguous parameters 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?

The description opens with a specific verb and resource: 'REVISE a shape you already committed', explicitly contrasting with deleting and starting over. It clearly distinguishes the tool from siblings like delete_shape and measure_polygon by framing a revision workflow for already-committed shapes.

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?

It gives an explicit loop: measure_polygon to commit, view_sheet with overlay:true to inspect, then edit_shape to fix errors. It also states a clear when-not rule: shapes a human affirmed (origin.reviewed) are refused, so the agent only revises its own pencil work.

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