Skip to main content
Glama

sweep_schedule_row

Mints a condition from a schedule row's tag and sweeps every plan sheet for matching markers, counting only where geometry and the row's tag agree on the same bubble.

Instructions

Take off a schedule row's mark from the row itself — the estimator's own gesture: a transition type sometimes exists only as a schedule row plus tag markers scattered across the plan sheets, and this tool mints the condition FROM the row and finds every occurrence. Pass the row's key (e.g. 'T1') and the tool (1) reads the row from the set's schedule tables (the sheet_graph/find_schedule machinery — the row is the condition's cited source), (2) anchors a geometric fingerprint on the marker the tag is DRAWN as on a plan sheet (a deterministic pad ladder around the tag text; where the tag occurs more than once the fingerprint must recur at a second occurrence before it is trusted — anchor.corroborated), and (3) sweeps every PLAN-role sheet for it. The count is geometry AND text agreeing: drafting reuses one bubble shape across many marks, so a match counts ONLY when the row's own tag sits within the marker footprint (its bbox rides the match as tag_at evidence); a match labeled with a SIBLING row's tag is excluded and says whose it is, an unlabeled match is withheld as a question, and a tag drawn with no matching marker is disclosed as text_only. REFUSAL over guessing, with the reason and the fix: no such row; the same key in two tables (ambiguous); a tag drawn on no plan sheet; no repeatable marker linework around the tag — a fingerprint is never guessed from text alone (the fallback is always: marquee one instance with symbol_sweep). commit: true commits the counted matches as EA markers under the row's own key — one undo step for the whole set-wide sweep, every marker carrying origin.assignment {source: "schedule"} plus the anchor and row citation on origin.symbol.seed. The COUNT is scale-free (EA), but matching is not: where the anchor sheet and a target sheet both carry a scale, the marker is resized by their exact ratio before matching (scaled per sheet), and where one does not, the sweep runs at 1:1 and discloses it (scale_assumed) rather than reporting a confident zero. After committing, LOOK: view_sheet {overlay: true} over each swept sheet. 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. LABEL-FIRST for devices (any trade): when the marker cannot be fingerprinted or does not reach a drawn tag amid linework — a heater bar or fan drawn to its own size, tagged by a leader — every such tag on a plan sheet counts as ONE instance BY LABEL, disclosed in found_by_label / label_only / counted_by; a bare mention in a note (no linework near it) is text_only, never a count. Rows come from every schedule family the sheet graph reads: room-finish, finish/material, and equipment (mechanical, electrical, plumbing, fire).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagYesThe schedule row's key exactly as drawn, e.g. 'T1', 'TR-2' — it becomes the condition tag on commit
commitNoCommit every counted match as one EA count marker (excluded/withheld/text_only never commit)
mirrorNoAlso match mirrored markers
rotationsNoAlso match 90/180/270-rotated markers
tolerance_pxNoEndpoint match tolerance in image px (default 2 — CAD jitter, not drift)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
rowYesThe schedule row the sweep was seeded from — the condition's source
tagYesThe row key as normalized (the tag as drawn)
noteNo
foundYesInstances counted across every plan sheet: geometry matches carrying the row's own tag PLUS drawn tags counted by label — see counted_by
anchorYesnull when the sweep counted BY LABEL: no repeatable marker geometry sits around the drawn tag (the equipment convention — a device drawn to its own size, tagged by a leader), so nothing was fingerprinted
sheetsYesOne entry per swept PLAN-role sheet, load order
skippedYesSheets excluded from counting (schedule/detail/legend/unknown), each with its reason
warningNoPresent when the per-sheet work cap dropped candidates
completeYesTrue when every proposed placement was scored on every swept sheet — false means at least one sheet's count is a FLOOR, not a total (#261)
ea_totalNo
committedNocommit mode: count shapes committed — one per counted match, the whole sweep ONE undo step
conditionNocommit mode: the condition minted FROM the row — its key is the tag
shape_idsNo
counted_byYesHow the count was made — "label" means no marker geometry was matched at all; look at each label_only placement before pricing
found_by_labelYes…of which drawn tags amid linework the fingerprint did not (or could not) reach — an installed instance by the equipment convention, disclosed as label-counted
found_by_geometryYes…of which marker-fingerprint matches corroborated by the tag

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed14 schema fields changedv0.1.21
    • removedOutput schema / properties / anchor / additionalProperties
      Removed value: -false
    • addedOutput schema / properties / anchor / anyOf
      Added value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "at": {
      +        "description": "The anchoring tag occurrence's center (image px)",
      +        "items": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "number"
      +          }
      +        ],
      +        "maxItems": 2,
      +        "minItems": 2,
      +        "type": "array"
      +      },
      +      "corroborated": {
      +        "description": "true = the fingerprint recurred at a second tag occurrence before being trusted; false = the tag is drawn too sparsely to cross-check (see note)",
      +        "type": "boolean"
      +      },
      +      "length_px": {
      +        "type": "number"
      +      },
      +      "occurrences": {
      +        "description": "Drawn occurrences of the tag across all plan sheets",
      +        "type": "integer"
      +      },
      +      "rect": {
      +        "description": "The fingerprint rect actually used [x0, y0, x1, y1] — the pad ladder's winning step",
      +        "items": {
      +          "type": "number"
      +        },
      +        "maxItems": 4,
      +        "minItems": 4,
      +        "type": "array"
      +      },
      +      "segments": {
      +        "description": "Vector segments in the marker fingerprint",
      +        "type": "integer"
      +      },
      +      "sheet": {
      +        "description": "The plan sheet the fingerprint was anchored on",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "sheet",
      +      "at",
      +      "rect",
      +      "segments",
      +      "length_px",
      +      "corroborated",
      +      "occurrences"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedOutput schema / properties / anchor / description
      Added value: +"null when the sweep counted BY LABEL: no repeatable marker geometry sits around the drawn tag (the equipment convention — a device drawn to its own size, tagged by a leader), so nothing was fingerprinted"
    • removedOutput schema / properties / anchor / properties
      Removed value: -{
      -  "at": {
      -    "description": "The anchoring tag occurrence's center (image px)",
      -    "items": [
      -      {
      -        "type": "number"
      -      },
      -      {
      -        "type": "number"
      -      }
      -    ],
      -    "maxItems": 2,
      -    "minItems": 2,
      -    "type": "array"
      -  },
      -  "corroborated": {
      -    "description": "true = the fingerprint recurred at a second tag occurrence before being trusted; false = the tag is drawn too sparsely to cross-check (see note)",
      -    "type": "boolean"
      -  },
      -  "length_px": {
      -    "type": "number"
      -  },
      -  "occurrences": {
      -    "description": "Drawn occurrences of the tag across all plan sheets",
      -    "type": "integer"
      -  },
      -  "rect": {
      -    "description": "The fingerprint rect actually used [x0, y0, x1, y1] — the pad ladder's winning step",
      -    "items": {
      -      "type": "number"
      -    },
      -    "maxItems": 4,
      -    "minItems": 4,
      -    "type": "array"
      -  },
      -  "segments": {
      -    "description": "Vector segments in the marker fingerprint",
      -    "type": "integer"
      -  },
      -  "sheet": {
      -    "description": "The plan sheet the fingerprint was anchored on",
      -    "type": "string"
      -  }
      -}
    • removedOutput schema / properties / anchor / required
      Removed value: -[
      -  "sheet",
      -  "at",
      -  "rect",
      -  "segments",
      -  "length_px",
      -  "corroborated",
      -  "occurrences"
      -]
    • removedOutput schema / properties / anchor / type
      Removed value: -"object"
    • addedOutput schema / properties / counted_by
      Added value: +{
      +  "description": "How the count was made — \"label\" means no marker geometry was matched at all; look at each label_only placement before pricing",
      +  "enum": [
      +    "geometry",
      +    "label",
      +    "mixed"
      +  ],
      +  "type": "string"
      +}
    • changedOutput schema / properties / found / description
      Previous value: -"Matches carrying the row's own tag — the honest count, across every plan sheet"New value: +"Instances counted across every plan sheet: geometry matches carrying the row's own tag PLUS drawn tags counted by label — see counted_by"
    • addedOutput schema / properties / found_by_geometry
      Added value: +{
      +  "description": "…of which marker-fingerprint matches corroborated by the tag",
      +  "type": "integer"
      +}
    • addedOutput schema / properties / found_by_label
      Added value: +{
      +  "description": "…of which drawn tags amid linework the fingerprint did not (or could not) reach — an installed instance by the equipment convention, disclosed as label-counted",
      +  "type": "integer"
      +}
    • addedOutput schema / properties / sheets / items / properties / label_only
      Added value: +{
      +  "description": "Instances counted BY LABEL: the row's tag drawn amid linework that the marker fingerprint did not match (or none was anchored) — the equipment convention; each is counted and each deserves a look",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "at": {
      +        "items": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "number"
      +          }
      +        ],
      +        "maxItems": 2,
      +        "minItems": 2,
      +        "type": "array"
      +      },
      +      "tag_at": {
      +        "$ref": "#/properties/row/properties/citation/properties/bbox"
      +      }
      +    },
      +    "required": [
      +      "at",
      +      "tag_at"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / properties / sheets / items / properties / text_only / description
      Previous value: -"The tag drawn with NO matching marker geometry nearby — a note reference or a variant marker; a question, never a count"New value: +"The tag drawn with no marker match AND no linework near it — a note mentioning the mark; a question, never a count"
    • changedOutput schema / properties / sheets / items / required
      Previous value: -[
      -  "sheet",
      -  "found",
      -  "matches",
      -  "withheld",
      -  "excluded",
      -  "text_only",
      -  "candidates",
      -  "complete",
      -  "elapsed_ms"
      -]New value: +[
      +  "sheet",
      +  "found",
      +  "matches",
      +  "withheld",
      +  "excluded",
      +  "text_only",
      +  "label_only",
      +  "candidates",
      +  "complete",
      +  "elapsed_ms"
      +]
    • changedOutput schema / required
      Previous value: -[
      -  "tag",
      -  "row",
      -  "anchor",
      -  "found",
      -  "sheets",
      -  "complete",
      -  "skipped"
      -]New value: +[
      +  "tag",
      +  "row",
      +  "anchor",
      +  "found",
      +  "found_by_geometry",
      +  "found_by_label",
      +  "counted_by",
      +  "sheets",
      +  "complete",
      +  "skipped"
      +]
  2. Changed4 schema fields changedv0.1.18
    • addedOutput schema / properties / complete
      Added value: +{
      +  "description": "True when every proposed placement was scored on every swept sheet — false means at least one sheet's count is a FLOOR, not a total (#261)",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / sheets / items / properties / complete
      Added value: +{
      +  "description": "True when every proposed placement on this sheet was scored — false means this sheet's count is a FLOOR, not a total (#261)",
      +  "type": "boolean"
      +}
    • changedOutput schema / properties / sheets / items / required
      Previous value: -[
      -  "sheet",
      -  "found",
      -  "matches",
      -  "withheld",
      -  "excluded",
      -  "text_only",
      -  "candidates",
      -  "elapsed_ms"
      -]New value: +[
      +  "sheet",
      +  "found",
      +  "matches",
      +  "withheld",
      +  "excluded",
      +  "text_only",
      +  "candidates",
      +  "complete",
      +  "elapsed_ms"
      +]
    • changedOutput schema / required
      Previous value: -[
      -  "tag",
      -  "row",
      -  "anchor",
      -  "found",
      -  "sheets",
      -  "skipped"
      -]New value: +[
      +  "tag",
      +  "row",
      +  "anchor",
      +  "found",
      +  "sheets",
      +  "complete",
      +  "skipped"
      +]
  3. Addedv0.1.12

TDQS

A4.7/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 delivers: refusal-over-guessing with reasons, commit semantics (one undo step for the whole sweep, markers carrying origin.assignment/origin.symbol.seed), scale handling (scaled vs scale_assumed rather than a confident zero), corroboration requirements for fingerprints, and the label-first fallback for non-fingerprintable markers. This is unusually rich behavioral disclosure.

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, and for a genuinely complex geometric sweep much of the content earns its place. However, the body is a single sprawling run-on paragraph stuffed with backticked field names and compressed labels like 'REFUSAL over guessing, with the reason and the fix', which harms scanability despite the density of useful information.

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?

An output schema exists, so return values need not be restated. The description still covers what an agent must know to call it correctly: coordinate space (image px at render scale 2.0), scale-ratio matching behavior, refusal cases, and required follow-up verification. Nothing material 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 the baseline is 3, but the description adds real meaning beyond the schema: it explains that the tag becomes the condition tag on commit, that commit produces one EA marker carrying cited provenance, and that counted vs excluded/withheld/text_only matches differ in whether they commit. mirror/rotations/tolerance_px are left to the schema, so it is not a full 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?

The description states a specific verb and resource ('Take off a schedule row's mark from the row itself'), explains the mechanism (mint the condition from the row and sweep for every occurrence), and explicitly distinguishes itself from the sibling fallback symbol_sweep. An agent can tell it apart from count_marks, symbol_sweep, and find_schedule without opening a schema.

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 says when to use it (a transition type exists only as a schedule row plus scattered tag markers), names the alternative (marquee one instance with symbol_sweep) and the post-commit verification step (view_sheet with overlay per swept sheet), and enumerates refusal conditions with their fixes. The usage boundary is fully drawn.

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