three_live_from_image
Reconstruct a Three.js scene script from a reference image, repair spatial and lint issues, and optionally refine it with rendered overlays and metric priors.
Instructions
Reconstruct a Three.js scene script from a reference image (local PNG/JPEG/WebP file path, data:image/...;base64 URI, or https:// URL) using a multimodal Chat Completions endpoint, with automatic sandbox + spatial linter (TL100-TL502) repair, optional closed-loop 50/50 overlay + 4-up visual refinement (visualTurns: 0..5), and optional metric spatial priors (AISpatialPriors). Also returns a rendered REFERENCE | RENDER | OVERLAY | SILHOUETTE DIFF comparison sheet (or 4-up contact sheet) when includeContactSheet is true.
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": {
"image": "<image>"
},
"name": "three_live_from_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| image | Yes | Local PNG/JPEG/WebP image file path, `data:image/(png|jpeg|webp);base64,...` URI, or `https://` URL. | |
| priors | No | Optional metric spatial priors (`AISpatialPriors`) in world meters (+Y up): `{ floorY?: number, camera?: { eye: [x,y,z], target: [x,y,z], fovDeg?: number }, planes?: [...], objects?: [...] }`. | |
| prompt | No | Optional natural-language instructions (e.g. 'Focus on the desk and lamp, make the lamp grabbable'). | |
| aiModel | No | Optional vision-capable model identifier (defaults to `THREE_LIVE_AI_MODEL` or `gpt-4o-mini`). | |
| aiEndpoint | No | Optional OpenAI-compatible Chat Completions URL (defaults to `THREE_LIVE_AI_ENDPOINT` or `https://api.openai.com/v1/chat/completions`). | |
| maxRepairs | No | Maximum error/warning repair turns after the initial draft (default 1, max 5). | |
| outputPath | No | Optional file path (.js) to save the generated Three.js scene script on disk. | |
| visualTurns | No | Closed-loop rendered `REFERENCE | RENDER | OVERLAY 50/50` + 4-up visual critique passes after initial compilation (default 0, max 5). | |
| includeQuadView | No | When `visualTurns > 0`, also attach a 512x512 `CAMERA | FRONT | TOP | ISO` 4-up depth check on each visual turn (default true). | |
| includeContactSheet | No | When true (default), renders a reference comparison sheet (or 4-up contact sheet) PNG and includes it as an image content block. | |
| includeComparisonImage | No | Alias for `includeContactSheet`: attach the final `REFERENCE | RENDER | OVERLAY 50/50` PNG as an MCP image content block. |