Skip to main content
Glama

align_stitch

Aligns a stitched sheet across its match line with two image-pixel reference points or verifies existing placements, then seam-checks linework displacement against tolerance.

Instructions

Align a composite stitched sheet surface across its match line using two matching reference points (image px) — one on each member sheet — or omit both anchor and moving to verify existing persisted member placements in place. Performs a seam check across the match line: analyzes vector wall linework crossing the seam, reports true maximum, 95th percentile, and median linework displacement (px and inches at scale), leftover rotation, and withholding status. Refuses if true maximum linework mismatch exceeds tolerance (default 0.50 in / 1/2", calibrated from real split plans). 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": {
      "stitch": "<stitch>"
    },
    "name": "align_stitch"
  }
}

Input Schema

NameRequiredDescriptionDefault
anchorNoFirst alignment point in image px (omit with moving to verify existing placement)
movingNoSecond alignment point in image px — sheet under moving translates to anchor (omit with anchor to verify existing placement)
stitchYesThe stitch key (starts with stitch:) to align or verify
tolerance_inNoLinework displacement tolerance in inches (default: 0.50)
rot_tolerance_degNoLeftover rotation tolerance in degrees (default: 0.25)

Output Schema

NameRequiredDescriptionDefault
nameYesName of the stitched surface
noteYes
extentYesComposite surface dimensions in image px at render scale 2.0
alignedYestrue = alignment completed
membersYesMember sheet placements within the composite surface
stitch_idYesThe aligned composite surface key (starts with stitch:)
seam_checkYesSeam linework check results

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.32

TDQS

A4/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 mostly succeeds: it discloses the seam-check analysis, the reported metrics (true max, 95th percentile, median displacement in px and inches, leftover rotation, withholding status), the refusal threshold with its real-world calibration, and the exact coordinate convention (image px at render scale 2.0, PDF pt × 2, origin top-left, y down). What it omits is whether a successful alignment is persisted and whether the operation is reversible.

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 purpose and mode logic are front-loaded in the first sentence, with behavior and coordinate details following. It is dense and parenthetical-heavy ('default 0.50 in / 1/2"', 'the browser canvas's native space'), but every clause carries information an agent needs.

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 five-parameter mutation tool with no annotations, the definition covers failure conditions, defaults, units, and coordinate space, and an output schema exists so return values need no explanation. The remaining gap is state semantics: the description does not say whether a successful alignment is written to the stitch or is preview-only.

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: anchor is on one member sheet and moving translates to it, the omit-both case turns the call into a verification, coordinates are image px at render scale 2.0, and the default tolerance is calibrated from real split plans. That goes beyond the schema text rather than restating it.

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?

The description opens with a specific verb and resource ('Align a composite stitched sheet surface across its match line') and immediately names the two operating modes: aligning with two reference points, or verifying existing placements by omitting both. It is clear what the tool does, though it never names the closest sibling (stitch_sheets) to distinguish alignment from stitching.

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 explicit mode selection: supply anchor and moving to align, omit both to verify persisted placements in place. It also states a hard refusal condition (true maximum linework mismatch above tolerance). It stops short of telling the agent when to prefer this over stitch_sheets or how to recover from a refusal.

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