Skip to main content
Glama

add_roof

Creates a complete gable, hip, or dormer roof from a ridge line and returns its element ID; optional sunlight shading makes exterior roofs read as solid volumes.

Instructions

Add a roof from its RIDGE LINE. Returns the new element id.

sunlight: shade the roof's faces from a sun direction. This is what makes a
  roof read as a solid volume rather than a flat patch of tiles, and it is
  worth setting on any exterior building.
sun_angle: degrees the light comes FROM. Use ONE angle for every roof on a
  map — two buildings lit from different directions read as a mistake
  immediately.
sun_contrast: 0 is flat, higher is starker.

IMPORTANT: `points` is the roof's ridge (the peak line), NOT a footprint to
trace. DD builds a complete, self-closing roof that slopes down `width`
woxels perpendicular to each side of the ridge, with hips/gables off the
ridge ends. The footprint covered = the ridge's bounding box expanded by
`width` on every side.

To roof a building W x H: put the ridge along the LONG axis, centered, and
set width = half the SHORT dimension so the eaves reach the side walls. The
ridge should be shorter than the long wall by ~width at each end (so the end
hips land on the short walls). Two points that are close together give a
near-pyramid (a square hip roof).

asset: a Roofs asset path (list_assets('Roofs')). type: 0=gable, 1=hip,
2=dormer. Roofs render above everything (z 800). Undoable as a create.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "points": "<points>",
      "asset": "<asset>"
    },
    "name": "add_roof"
  }
}

Input Schema

NameRequiredDescriptionDefault
typeNo
assetYes
widthNo
pointsYes
sortingNo
sunlightNo
sun_angleNo
sun_contrastNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.5.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so: it discloses the generated geometry (self-closing roof, slopes down `width` woxels, hips/gables at ridge ends), the resulting footprint, z-ordering (renders at z 800 above everything), and the undo contract ("Undoable as a create"). Side effects an agent could not guess are all stated.

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?

The critical warning about `points` is front-loaded in caps before the extended geometry tutorial, and parameters are grouped logically. Some sentences carry rationale rather than instruction ("what makes a roof read as a solid volume rather than a flat patch of tiles"), which lengthens the text without changing the call.

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 an 8-parameter, no-annotation, no-output-schema mutation tool, the description covers geometry math, sizing heuristics, z-order, and undo semantics — everything needed to call it correctly and predict the result. The single gap (`sorting`) is minor for a tool that already fixes roof z at 800.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate and largely does: `points` is explicitly redefined as the ridge peak rather than a footprint, `width` is given a geometric meaning plus a W×H sizing formula, `type` enumerates 0=gable/1=hip/2=dormer, `asset` points to list_assets('Roofs'), and all three sun parameters are explained including the 0-is-flat scale. Only `sorting` is left undocumented.

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 ("Add a roof") plus the decisive qualifier "from its RIDGE LINE" and states the return value ("Returns the new element id"). An agent can distinguish this from add_floor/add_wall siblings 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 when-to guidance for sunlight ("worth setting on any exterior building") and a cross-element consistency rule ("Use ONE angle for every roof on a map"). It does not name an alternative tool or state when NOT to use this one, so it stops short of full routing guidance.

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