Skip to main content
Glama

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

NameRequiredDescriptionDefault
rectNo
snapNo
floorNopattern
pointsNo
wall_typeNo
floor_slotNo
wall_assetNo
wall_jointNo
floor_assetNo
floor_colorNo
shared_wallsNosplit
floor_categoryNoSimple Tiles

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.5.0

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full disclosure burden and does so thoroughly: it explains that the shared wall belongs to the room built first and that deleting it later leaves this room open, that only walls of matching wall_type (and wall_asset) are shared, and that a fully walled boundary with floor='none' is refused. It also pre-announces both return shapes and the walls_considered / shared_walls_note fields used when the read is truncated, which is exactly the kind of non-obvious behavior an agent needs.

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?

Front-loaded with the one-call promise, then organized as an implicit parameter glossary plus a returns line — no filler sentences. It is dense and slightly run-on in the shared_walls paragraph, which an agent must parse as several nested conditionals, but every clause carries information not available elsewhere.

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 12-parameter construction tool with no annotations and no output schema, the definition covers purpose, both input shapes, per-parameter meaning, sharing semantics, refusal cases, and both return shapes. Nothing an agent needs in order to call it correctly and interpret the result is missing.

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?

With 0% schema description coverage across 12 parameters, the description is the only source of meaning and it covers nearly all of them: units for rect/points (woxels, wall centerline), the three floor modes, floor_color's implicit greyscale/red-mask fallback, enumerated wall_type and wall_joint values, and snap behavior including the hex corner caveat. The gap is floor_slot, which is only mentioned in passing inside the 'terrain' clause and never explained as a target index.

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?

Opens with a specific verb+resource+scope: 'Build a room in one call: a looped wall AND a matching floor on the SAME path,' and immediately distinguishes it from the separate-sibling pattern (draw_wall / add_floor) by analogy to the UI's combined wall+floor trace. An agent can tell exactly what this produces without opening the schema.

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 concrete decision rules for the main branches: 'Provide ONE of: rect ... or points', 'floor: ... or 'none' for walls only', 'omit for the default', 'see get_snap_settings' for snap, and 'keep' vs 'split' for shared_walls. It stops short of naming sibling tools to use for wall-only or floor-only work, so the routing to alternatives is implied through parameter modes rather than stated explicitly.

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