Skip to main content
Glama

Build physics-checked scenes from a sentence or a JSON spec: objects, liquids, grains, cloth, cables

compose

Build scenes from a sentence or spec: pick objects from card libraries, place them with support and clearance rules, run alloy.check after each placement, and fix flagged issues.

Instructions

Pick objects from the card library (Alloy's, alloy-assets, every imported library and your own folders), place them with support, clearance and clutter rules, run alloy.check after every placement and a full check at the end, and fix what the checks flag. Liquids and grains fill containers by volume or mass ('a mug with 200 ml of water'), pour as a stream, or pile at their angle of repose; cloth lies flat, drapes or hangs over the table edge; cables have a length, a gauge and ends plugged into objects. Returns every scene with its objects, soft items (amounts, routes, estimates), check report and metrics. Example arguments: {"sentence": "a mug and two cubes on a table", "variations": 1, "out": "my_scenes"}

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": "compose"
  }
}

Input Schema

NameRequiredDescriptionDefault
outNofolder to save scenes/<name>.yaml and compose.json
areaNox0 y0 x1 y1 (m): where objects may go
seedNoseed (same seed, same scene)
specNoa SceneSpec as JSON instead of a sentence (alloy.compose.parse gives one)
checkNofull: load checks per placement + a full check; load; nonefull
deviceNo'cpu' or 'cuda:0' (default: the GPU if there is one)
jitterNoeach world moves the free objects a little
robotsNorobot files (MJCF) to stand at the table edge
worldsNoparallel worlds in the saved scene cards
libraryNoyour card folders, searched first (e.g. from alloy create)
sentenceNothe scene in words, e.g. 'three nuts in a tray on a cluttered table'
variationsNoextra scenes with new poses and objects

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare this is a non-readonly, idempotent=false, non-destructive, closed-world operation, so the safety profile is covered. The description usefully adds that per-placement checks run and that failures are meant to be fixed, plus what the return payload contains. It omits notable operational traits: that scenes are written to disk under 'out', that GPU/parallel-world composition with checks is expensive, and that seed controls determinism.

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 capability statement and the placement/check rules are front-loaded, and the return-shape sentence sits last where an agent expects it. It is dense and sentence two is a long run-on covering three material types, but every clause carries information an agent can act on.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 12-parameter, no-output-schema tool the description does well on return shape and on the physics workflow, and the schema documents every parameter. The real gap is that with zero required parameters nothing states that at least one of 'sentence' or 'spec' must be supplied, nor how the two interact if both are given.

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, and the description goes modestly beyond it by showing what a 'sentence' may express (e.g. 'a mug with 200 ml of water', cloth draping over the table edge, cables with length and gauge) and by pointing at alloy.compose.parse as the source of a 'spec'. Those hints materially help the agent author valid arguments rather than just naming fields.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a concrete verb-and-resource: build physics-checked scenes by picking objects from card libraries, placing them under support/clearance/clutter rules, then verifying. It also enumerates the modeled material types (liquids, grains, cloth, cables), so an agent knows exactly what domain it covers. It does not, however, contrast itself with siblings like build or scene, so the differentiation is left to the title.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied through the workflow ('run alloy.check after every placement and a full check at the end') and through the example arguments, but there is no explicit statement of when to prefer this tool over build/scene/create. The one genuine disambiguation is the note that 'spec' takes a SceneSpec 'instead of a sentence', which tells the agent the two input modes are alternatives but not whether one is required.

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