Skip to main content
Glama

fit_to_reference

Destructive

Moves, scales, and tilts model parts to match reference silhouettes, correcting placement and proportions without changing their shapes.

Instructions

Move, scale and tilt parts by itself to raise the match with reference silhouettes. Use it when the forms are roughly right: it fixes placement and proportions, not shapes. For each part in parts it keeps the changes that raise the world-registered IoU over all views (as compare_view measures it). references maps a view (as in compare_view) to an image; names is the whole model (everything visible but a huge floor or backdrop when empty). Scale per view, as in compare_view: height_m (vertical of the picture) or width_m (horizontal). Each is one number for all views or a dict per view, and every view needs one: height_m=0.152 with width_m={"top": 0.0325}. A size that names the view wins over a plain number. mirror_pairs [["arm_L","arm_R"]] keeps pairs symmetric (list both in parts). tune picks what may change. Guard: a move that raises the IoU but hides the part is refused: visible_share (the share of the part that the rest of the model does not cover) may drop by max_hide at most (1 turns the guard off). The answer lists rejected moves and visible_share [before, after]. It takes the checkpoint 'before_fit' first: rollback undoes it. Background job: after wait seconds the answer is a job id for job_status.

Input Schema

NameRequiredDescriptionDefault
sizeNo
tuneNo
waitNo
namesNo
partsYes
step_mNo
width_mNo
height_mNo
max_hideNo
max_tiltNo
tilt_degNo
max_shiftNo
thresholdNo
iterationsNo
referencesYes
scale_stepNo
time_limitNo
mirror_pairsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses that a checkpoint 'before_fit' is taken first and that rollback undoes it, that the guard refuses moves which raise IoU but hide a part (with the max_hide semantics and 1 = off), what the answer contains (rejected moves and visible_share [before, after]), and the background-job behavior (after `wait`, the answer becomes a job id for job_status). These are exactly the operational traits an agent needs and none are derivable from readOnlyHint/destructiveHint.

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?

Long but appropriately sized for an 18-parameter tool, and it is front-loaded: purpose and the when-to-use condition come first, then inputs, then the guard and checkpoint/job behavior. Some sentences are grammatically tangled ('Move, scale and tilt parts by itself') and a few (e.g. the scale-per-view example) could be tightened, but there is little true filler.

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 mutation tool with 18 params and no output schema, it covers the essentials an agent would otherwise guess wrong about: the checkpoint/rollback contract, the hide guard and its return fields, and the deferred job-status flow. The remaining gap is the unexplained tuning parameters, which prevents a 5.

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?

With 0% schema coverage the description carries the full burden, and it does explain the hardest parameters: the per-view `references` mapping, `names` semantics ('everything visible but a huge floor or backdrop when empty'), the single-number-or-dict per-view form of height_m/width_m and the view-name-wins rule, `mirror_pairs`, `tune`, and `max_hide`. However, many numeric knobs that materially change behavior (size, step_m, scale_step, threshold, iterations, max_shift, max_tilt, tilt_deg, time_limit) are entirely unexplained, so the coverage is partial.

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 specific verb set (move, scale, tilt), the resource (parts), and the mechanism/goal (raise match with reference silhouettes via world-registered IoU). It implicitly separates itself from sibling measurement tools ('as compare_view measures it') and from pure transforms (transform_objects/apply_transforms), so an agent can distinguish it without opening schemas.

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?

Gives a clear selection condition and an exclusion: 'Use it when the forms are roughly right: it fixes placement and proportions, not shapes.' That tells the agent both when to reach for it and when not to. It stops short of naming a specific alternative tool for the 'wrong shapes' case, so it is strong but not fully routing.

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