Skip to main content
Glama

scope_merge

Resolve a floor shape collision: trim the overlapping loser to its remainder by exact boolean difference, or delete it when overlap covers 98% or more.

Instructions

Resolve ONE collision (#366): given a pair of floor shapes and the winner, the loser gives up the shared floor — TRIMMED to its remainder by an exact boolean difference (the cut_out module's own arithmetic; its quantities re-measured from the result), or DELETED outright when the overlap is near-total (≥ 98% of the loser: the same space claimed twice, not a room with a sliver left). One journal step either way; undo_last restores the loser verbatim. Who wins: state winner; with it omitted the reviewed shape wins over a pending one, and the verb refuses when neither is reviewed (it does not guess which condition the floor belongs to) or when BOTH are (that is the estimator's call — the collision shows on both condition rows in the canvas). The ink rule is absolute: a loser the estimator affirmed is refused whoever you name. A trim that would split the loser into disjoint pieces refuses — that is a re-trace decision, not a merge — and a loser carrying reconciled cutouts refuses (delete the cuts first).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
winnerNoWhich of the two keeps the shared floor; omit to let the reviewed one win
shape_aYesOne shape of the pair (from scope_duplicates)
shape_bYesThe other

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteYes
loserYes
actionYes
winnerYes
shared_sfYes
loser_holesNotrimmed: holes the remainder carries (a winner inside the loser leaves one)
shape_countYes
loser_after_sfYes
loser_before_sfYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.21

TDQS

A4.8/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 does so: one journal step either way, undo_last restores the loser verbatim, the ≥98% near-total overlap deletion rule, the exact boolean-difference trim, and the full set of refusal conditions. This is unusually rich behavioral disclosure for a mutation tool.

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 core action is front-loaded in the first clause and every sentence carries behavioral information, but the dense parentheticals, dashes and domain jargon ("the ink rule", "re-trace decision") make it heavy to parse for a single tool definition.

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 explained. Given that, the description covers the winner-resolution logic, journaling/undo, and all refusal paths—nothing an agent needs to invoke it correctly 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: how the winner parameter defaults (reviewed beats pending), and how shape_a/shape_b tie to the pair from scope_duplicates. It goes beyond restating the schema fields.

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?

States a precise verb and object: resolve ONE collision between a pair of floor shapes, with the winner keeping the shared floor and the loser trimmed or deleted. It clearly distinguishes itself from siblings like scope_duplicates (which finds the pair) and cut_out (whose arithmetic it reuses).

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?

Extensively specifies when it applies and when it refuses: neither reviewed, both reviewed, an affirmed loser (the ink rule), a trim that would split the loser into disjoint pieces, and a loser carrying reconciled cutouts. It also routes to alternatives (delete the cuts first; a re-trace decision).

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