Skip to main content
Glama
U-C4N
by U-C4N

Architecture: Detect Rooms

arch_rooms_detect
Read-only

Detect and measure rooms in AutoCAD plans by splitting wall lines, finding enclosed faces, filtering tiny or thin areas, and reporting area, confidence, labels, and skipped entities.

Instructions

Read the rooms of a plan - ours or a foreign one made of plain lines.

Every LINE and lightweight polyline on the layers is split where lines cross or touch, and the closed faces they bound are measured (mm², net of nested pieces). Faces under min_area, and thin faces (mean width under 600 mm - wall bodies and reveals, this reader's heuristic) are left out. Each room reports confidence: 1.0 when every edge lies on the arch wall layer, 0.6 when any edge is a plain line from elsewhere - read confidence_min before trusting a foreign plan. Room labels already on the drawing are reported in labels with the face they sit in; a face with more than one is listed in label_conflicts.

Never modifies the drawing. Arcs and bulged polyline edges, old-style POLYLINEs and block references are listed in skipped with their handle and reason - never flattened into chords, never dropped silently. Read skipped before trusting count. A foreign plan's open doorways are not closed - two rooms joined by one read as one face. Refused: a named layer the drawing does not have (with the list of the ones it has), and no layer matching WALL or DUVAR when layers is omitted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tolNoEndpoints closer than this (mm) are one corner.
layersNoLayers holding the walls; default: every layer whose name contains WALL or DUVAR.
min_areaNoSmallest room reported, mm² (1e6 = 1 m²).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.6.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=true; the description adds substantial behavior beyond that: the line-splitting/face-measurement algorithm, the 600 mm thin-face heuristic, confidence scoring rules, label conflict reporting, and the guarantee that arcs/bulges/blocks are listed in `skipped` rather than silently dropped. This is exactly the extra context annotations cannot carry.

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?

Dense and front-loaded with the core purpose first, then exclusions, confidence, and refusal cases. It is long, but nearly every sentence carries operational information; minor tightening is possible.

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?

For a read-only analysis tool with a full output schema, the description covers purpose, failure modes, confidence semantics, and skipped-entity handling. An agent has everything needed to call it and interpret the result.

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: it explains the default WALL/DUVAR layer-matching rule and the refusal behavior when `layers` is omitted or names a missing layer, and ties `min_area` to the filtering behavior.

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+resource ('Read the rooms of a plan') and immediately scopes it to both native and foreign/plain-line plans. Clearly distinguishable from write-oriented siblings like arch_room or hatch_add_boundary.

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 strong preconditions: read `confidence_min` before trusting a foreign plan, read `skipped` before trusting `count`, and lists explicit refusal cases (unknown named layer, no WALL/DUVAR layer). It lacks explicit 'use X instead' routing to 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.

Deploy Server

Other Tools