Skip to main content
Glama

stitch_sheets

Combine 2–4 plan sheets into a composite surface, align match lines, and measure continuously across seams once member sheets share calibrated scales.

Instructions

Stitch 2–4 plan sheets together into a composite working surface across match-lines (#161) — the browser canvas's Stitched Sheets feature. Shapes traced on the returned stitch reference bind to the composite key ("stitch:") and measure continuously across seam boundaries once aligned. By default sheets create in auto-butt layout (aligned: false). Use align_stitch with two matching reference points to align sheets across their match line and run the automated linework seam check; measuring across a seam on an unaligned or withheld stitch is refused. Member sheets must have calibrated, matching scales. 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": {
      "sheets": "<sheets>"
    },
    "name": "stitch_sheets"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoOptional human-readable label for the composite sheet (defaults to "Stitched sheets")
alignNoTwo-point match line alignment
sheetsYes2–4 sheet keys or sheet numbers to stitch together
membersNoExplicit member sheet placements in image px (alternative to auto-butt or align)

Output Schema

NameRequiredDescriptionDefault
nameYesName of the stitched surface
noteYes
scaleYesScale status inherited from member sheets, if all member scales agree
extentYesComposite surface dimensions in image px at render scale 2.0
alignedYestrue = aligned across match lines; false = starting auto-butt layout
membersYesMember sheet placements within the composite surface
stitch_idYesThe created composite surface key (starts with stitch:)
seam_checkNoSeam linework check results when align was provided

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.32

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations to lean on, the description carries the full burden and does so well: it discloses the composite key binding ('stitch:<uid>'), the default auto-butt layout, the refusal behavior when measuring across an unaligned or withheld stitch, and the calibrated-matching-scale precondition. It also pins down the coordinate space (image px at render scale 2.0, origin top-left, y down) and notes that payloads carry dims in both px and pt.

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?

The description is dense but front-loaded: creation, key binding, default layout, then the align_stitch follow-up and preconditions. A few parenthetical asides ('the browser canvas's Stitched Sheets feature', 'the browser canvas's native space') repeat context and could be trimmed without loss.

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?

For a nested-object, mutation-style tool with an output schema already covering return values, the description supplies everything an agent needs: creation semantics, layout defaults, the alignment workflow with its sibling, refusal conditions, scale preconditions, and coordinate conventions.

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; the description earns extra credit by explaining the coordinate units and scale for the alignment points and by clarifying that 'align' is a two-point match-line operation, which the schema only labels. It adds less for 'members' and 'name', leaving those to 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 ('Stitch 2–4 plan sheets together into a composite working surface across match-lines') and names the feature domain ('Stitched Sheets'). It clearly distinguishes itself from the sibling align_stitch by describing stitching as creation and alignment as a separate follow-up step.

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?

It gives a clear workflow: create the stitch here, then use align_stitch with two matching reference points to align across the match line and run the seam check. It also states the default behavior (auto-butt layout, aligned: false) and the precondition that member sheets must have calibrated, matching scales. It doesn't cover when one would prefer explicit 'members' placements over auto-butt/align, so it falls short of full when/when-not guidance.

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