Skip to main content
Glama

Set or trace a scanned plan

edit_background
Destructive

Place a scanned floor plan under the drawing at real scale, or trace it into walls. Set calibration, angle, offset, opacity, or detect walls in one undo step.

Instructions

Put a scanned plan under the drawing at real scale, or turn it into walls. set {path, then cm_per_px (+cm_per_px_y), calibrate {a,b px, cm} or calibrations [{a,b,cm}…] to fit X/Y scales; angle (clockwise °); offset, opacity, visible; clear=true removes it}. trace {threshold?, min_len?, t_min?, t_max?, max_gap?, region?, h?} creates, in one undo step, the walls background detects with the same options, on the image set puts there. Check with render_plan bg=0.5.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hNoFor `trace`: wall height cm (default 250)
pathNoFor `set`: image file (png/jpg/webp/bmp); required when there is no background yet
angleNoFor `set`: clockwise turn of the image, degrees
clearNoFor `set`: remove the background
t_maxNoFor `trace`: thickest wall kept, cm (default 45)
t_minNoFor `trace`: thinnest wall kept, cm (default 5)
actionYesWhat to do with the scanned plan
offsetNoFor `set`: plan position cm of the image's top-left corner
regionNoFor `trace`: only this part of the plan `[x0, y0, x1, y1]` cm
max_gapNoFor `trace`: doors and windows up to this wide don't split a wall, cm (default 130)
min_lenNoFor `trace`: shortest wall kept, cm (default 60)
opacityNoFor `set`: how opaque the image is drawn, 0..1
visibleNoFor `set`: show or hide the image without removing it
calibrateNoFor `set`: two pixels with a known real distance, `{a, b, cm}`
cm_per_pxNoFor `set`: the scale, cm per image pixel
thresholdNoFor `trace`: luminance 0..255 below which a gray pixel is ink (default 128)
cm_per_px_yNoFor `set`: the vertical scale, when it differs
calibrationsNoFor `set`: several known distances, fitting X and Y scales apart

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
vNo
okYes
idsNo
revNo
textYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.0.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations mark it as destructive (destructiveHint: true) and not read-only, and the description reinforces that `trace` creates walls 'in one undo step' and `set` modifies the drawing. It also notes that `clear=true` removes the background. This adds useful behavioral context beyond annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense but front-loads the two actions. However, it crams many parameter details into a single run-on sentence, making it harder to parse. Some redundancy with schema descriptions.

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?

Given 18 parameters and a destructive operation, the description covers the key behaviors: scale calibration, undo step, and removal. It also refers to `render_plan` for checking. An output schema exists, so return values needn't be explained. The only gap is not explaining when to use this tool versus `background` or `edit_walls`.

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?

The description enumerates all parameters and their purposes, but the schema already has 100% description coverage for each parameter. The description adds value by grouping parameters by action and explaining defaults, but doesn't go beyond the schema substantially. Baseline 3, bumped to 4 for practical grouping.

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 clearly states two specific operations: placing a scanned plan under the drawing at real scale, and turning it into walls. It distinguishes itself from siblings by naming the `action` values and what each does. However, it doesn't differentiate from `edit_walls` or `background`, which may overlap.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use each action but doesn't explicitly state when to choose `set` vs `trace` vs alternatives like `background` or `edit_walls`. It only gives a hint to check with `render_plan`.

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