Skip to main content
Glama

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

NameRequiredDescriptionDefault
imageYesLocal PNG/JPEG/WebP image file path, `data:image/(png|jpeg|webp);base64,...` URI, or `https://` URL.
priorsNoOptional metric spatial priors (`AISpatialPriors`) in world meters (+Y up): `{ floorY?: number, camera?: { eye: [x,y,z], target: [x,y,z], fovDeg?: number }, planes?: [...], objects?: [...] }`.
promptNoOptional natural-language instructions (e.g. 'Focus on the desk and lamp, make the lamp grabbable').
aiModelNoOptional vision-capable model identifier (defaults to `THREE_LIVE_AI_MODEL` or `gpt-4o-mini`).
aiEndpointNoOptional OpenAI-compatible Chat Completions URL (defaults to `THREE_LIVE_AI_ENDPOINT` or `https://api.openai.com/v1/chat/completions`).
maxRepairsNoMaximum error/warning repair turns after the initial draft (default 1, max 5).
outputPathNoOptional file path (.js) to save the generated Three.js scene script on disk.
visualTurnsNoClosed-loop rendered `REFERENCE | RENDER | OVERLAY 50/50` + 4-up visual critique passes after initial compilation (default 0, max 5).
includeQuadViewNoWhen `visualTurns > 0`, also attach a 512x512 `CAMERA | FRONT | TOP | ISO` 4-up depth check on each visual turn (default true).
includeContactSheetNoWhen true (default), renders a reference comparison sheet (or 4-up contact sheet) PNG and includes it as an image content block.
includeComparisonImageNoAlias for `includeContactSheet`: attach the final `REFERENCE | RENDER | OVERLAY 50/50` PNG as an MCP image content block.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.5.1

TDQS

A4/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false, openWorldHint=true and idempotentHint=false; the description adds substantive behavior beyond that: a multimodal Chat Completions call to an external endpoint, automatic sandbox plus spatial linter repair with a disclosed TL100-TL502 code range, optional closed-loop visual critique, and an attached comparison image. It stops short of mentioning credential/network-cost requirements or error behavior when the endpoint fails.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core operation is front-loaded, but the whole definition is a single dense sentence stuffed with parentheticals and internal jargon (TL100-TL502, AISpatialPriors, 4-up contact sheet), which makes it slower to parse than a short bulleted breakdown would be.

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

Completeness4/5

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

For an 11-parameter generative tool with no output schema, the description covers the return surface (a comparison sheet or 4-up contact sheet image) and the major pipeline stages. Gaps remain around authentication, whether outputPath writes to disk outside the sandbox, and failure modes, but the agent has enough to invoke it correctly.

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 a 3 is the baseline, but the description earns more by explaining what the parameters collectively produce — repair turns governed by linter codes, visualTurns as REFERENCE | RENDER | OVERLAY passes, and includeContactSheet emitting an image content block rather than a path. It does not clarify priors units beyond the schema's world-meter note.

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?

States a specific verb and resource: reconstruct a Three.js scene script from a reference image. It also enumerates the accepted input forms and the optional repair/refinement stages, which lets an agent distinguish it from siblings like three_live_validate or three_live_render 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 Guidelines3/5

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

Usage is implied rather than prescribed: it explains what each mode does (visualTurns, includeContactSheet, maxRepairs), so an agent can infer when to enable refinement, but it never says when this tool is the right choice versus the sibling validate/render/convert tools, nor does it state prerequisites such as an API key.

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