Skip to main content
Glama

Find walls in a scan

background
Read-only

Detect walls from a scanned floor plan by reading thick dark or gray bands, ignoring colored areas, and joining segments across doors or windows. Returns wall coordinates in cm.

Instructions

Walls detected in the scanned plan under the drawing (edit_background action=set puts it there): thick dark or gray bands across or down the image become walls, colored areas (lawn, plants, furniture) are ignored, and pieces split by doors or windows up to max_gap join; region limits the search. Returns rows [[x1,y1],[x2,y2],t] in plan cm without drawing; edit_background action=trace creates them. Check with render_plan bg=0.5.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hNoWall height cm when creating (default 250)
t_maxNoThickest wall kept, cm (default 45)
t_minNoThinnest wall kept, cm (default 5)
regionNoOnly this part of the plan `[x0, y0, x1, y1]` cm
max_gapNoDoors and windows up to this wide don't split a wall, cm (default 130)
min_lenNoShortest wall kept, cm (default 60)
thresholdNoLuminance 0..255 below which a gray pixel is ink (default 128; raise it for light gray walls)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
rowsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.0.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false; the description reinforces this by stating results are returned 'without drawing'. It goes further than annotations by disclosing the detection heuristics (thick dark/gray bands, colored areas ignored, door/window gaps joined) and the luminance-based threshold behavior.

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?

One dense paragraph that is front-loaded with the detection rules and ends with the return shape and cross-references. Nearly every clause carries information, though the long em-dash construction is somewhat run-on and could be split for faster scanning.

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?

Output schema exists, so describing return values is not strictly required, yet the description still names the row format and units, which helps interpretation. Detection rules, preconditions, and verification tooling are all covered; only edge-case behavior (e.g., no walls found, very large scans) is left unstated.

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 description coverage is 100%, so the baseline is 3. The description still adds meaning beyond the schema for the two subtlest params: max_gap ('pieces split by doors or windows up to max_gap join') and region ('limits the search'), which make their effect on output concrete.

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 and resource (detect walls in a scanned plan) and pins down the exact source of the image ('under the drawing, put there by edit_background action=set'). It is clearly distinguishable from siblings like edit_walls and edit_background, which create or modify rather than detect.

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?

Explains the precondition (a scan must already be placed via edit_background action=set) and routes the agent to related siblings for adjacent tasks (edit_background action=trace to create, render_plan bg=0.5 to verify). No explicit 'do not use this when…' exclusion among siblings, so it stops short of a 5.

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