build_room
Creates a closed wall loop and matching floor from a rectangle or polygon in one call, ensuring battle-map rooms have no gap between wall and floor.
Instructions
Build a room in one call: a looped wall AND a matching floor on the SAME path.
Because the wall and floor share the boundary, the floor meets the wall
exactly (no gap) — like the UI's combined wall+floor trace. Provide ONE of:
rect: [x, y, w, h] axis-aligned rectangle, or
points: [[x,y], ...] a polygon (>= 3 points), all in woxels (the wall
centerline; the wall covers the floor's outer edge).
wall_asset: a Walls asset path (omit for the default).
floor: 'pattern' (a tiled floor; floor_asset + floor_category), 'terrain'
(paints terrain into floor_slot; floor_asset assigns the slot texture),
or 'none' for walls only.
floor_asset: the floor texture. floor_category: pattern bank for floor=
'pattern' (e.g. 'Simple Tiles', 'Smart Tiles', 'Materials').
floor_color: optional '#rrggbb' tint (pattern floors). Omitted, a greyscale
or red colour mask texture gets a neutral brown, as in place_pattern.
wall_type: 0=auto, 1=manual, 2=cave. wall_joint: 0=sharp, 1=bevel, 2=round.
snap: 'none', 'grid' or 'auto'; see get_snap_settings. A rect
gets all four corners on the grid (on hex, the far one may shift).
shared_walls: 'split' (default) leaves out the parts of the boundary an
existing wall on this level already covers, so two rooms side by side
share ONE wall and a door placed on it opens in a VTT export. Only a
wall of the same wall_type (and of wall_asset, when given) is shared.
A boundary walled all round gets only its floor (refused with
floor='none'). The shared wall belongs to the room built first:
deleting it later leaves this room open on that side. 'keep' always
draws the full loop.
Returns { wall_id, floor_id?, points }, or, when walls were shared,
{ wall_ids, shared_edges, floor_id?, points } (wall_ids may be empty).
On a map with more walls than one read covers, walls_considered and
shared_walls_note say how many were checked for sharing.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "build_room"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rect | No | ||
| snap | No | ||
| floor | No | pattern | |
| points | No | ||
| wall_type | No | ||
| floor_slot | No | ||
| wall_asset | No | ||
| wall_joint | No | ||
| floor_asset | No | ||
| floor_color | No | ||
| shared_walls | No | split | |
| floor_category | No | Simple Tiles |