Skip to main content
Glama

compare_sheets

Compare two drawing sheets or revisions to detect moved linework, group added, removed, or modified ink into changed regions, and return affected takeoff shape IDs for re-checking.

Instructions

Visual revision comparison of two sheets (or revisions of a sheet): discovers what moved between them. Automatically aligns vector linework, computes segment differences, groups modified/added/removed ink into changed region bounding hulls, and returns existing takeoff shape IDs on sheet_a that intersect changed ink so an agent can re-check only what moved. 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_a": "<sheet_a>",
      "sheet_b": "<sheet_b>"
    },
    "name": "compare_sheets"
  }
}

Input Schema

NameRequiredDescriptionDefault
sheet_aYesBase sheet key or filename (e.g. 'plans.pdf#1')
sheet_bYesIncoming/revised sheet key or filename
alignmentNoOptional manual translation offset; defaults to auto-alignment by title-block/drawing frame

Output Schema

NameRequiredDescriptionDefault
statsYes
sheet_aYes
sheet_bYes
alignmentYes
diff_methodYes
changed_regionsYes
flagged_shape_idsYesIDs of existing takeoff shapes on sheet_a that touch changed ink and require re-review

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.32

TDQS

A3.9/5.0
Behavior4/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 substantial work: it discloses the auto-alignment default (title-block/drawing frame), the manual override, the processing pipeline (align, segment diff, group into changed-region hulls), and the returned shape-ID intersection semantics. Gaps remain around failure modes (e.g. mismatched page sizes or failed alignment) and cost/latency for large sheets, which for a comparatively expensive compute tool would matter.

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?

Front-loaded with purpose, then behavior, then the coordinate caveat an agent needs before interpreting results. Sentences are dense but each carries information; the coordinate sentence is long yet necessary given the px-at-2.0 convention.

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 complex, compute-heavy comparison tool with output schema present, the definition covers purpose, defaults, pipeline, and coordinate frame — the main ambiguity an agent would hit when calling it. Missing are error/failure behavior and scale limits, the only substantive gaps given output schema handles returns.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so sheet_a/sheet_b roles and the dx/dy alignment override are already documented. The description adds little parameter-specific meaning beyond reiterating the auto-alignment default; its coordinate-system sentence is output semantics, not input semantics. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Visual revision comparison of two sheets (or revisions of a sheet)') and even names the immediate outcome ('discovers what moved between them'). It is unmistakably distinct from generic readers like get_sheet_vectors, but it never names a sibling or a non-overlapping alternative, which keeps it just short of a 5.

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?

The use case is clear: compare a base vs revised sheet and, via returned intersecting takeoff shape IDs, re-check 'only what moved' instead of re-reviewing everything. It offers no exclusions or named alternative tools (e.g. for raw vector extraction), so context is clear but guidance is one-sided.

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