Skip to main content
Glama

three_live_bake_textures

Generates AI textures requested by a Three.js scene through an OpenAI-compatible Images endpoint and saves them into a reusable texture pack, returning a preset-vs-AI comparison and bake report.

Instructions

Generate the AI textures a scene asks for (mesh.userData.xr = { material: { preset, prompt, size: 256 | 512 | 1024, seed } }) through an OpenAI-compatible Images endpoint and save them in a texture pack. Use it last, after geometry and presets look right: it needs a configured image endpoint and costs money per texture. Returns a preset-vs-AI comparison image and the bake report. Pass the pack to three_live_render / three_live_convert (texturePack / texturePackPath) and ship it with the scene (<three-live texture-pack=...>).

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

Input Schema

NameRequiredDescriptionDefault
codeNoInline Three.js scene script. Provide either `code` or `inputPath`.
onlyNoOptional node names; only their textures are generated.
forceNoRegenerate textures the pack already has (bump `seed` instead to keep the old one).
inputPathNoPath to a .js scene script when `code` is not provided.
outputPathNoRecommended: where to write the pack JSON. Without it the pack is returned inline.
texturePackNoOptional existing pack to extend (entries it already has are reused).
aiImageModelNoOptional image model (defaults to `THREE_LIVE_AI_IMAGE_MODEL`).
aiImageEndpointNoOptional Images endpoint URL (defaults to `THREE_LIVE_AI_IMAGE_ENDPOINT`).
texturePackPathNoOptional path to an existing pack JSON file to extend.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.5.1

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already flag the mutation/open-world/non-idempotent profile, and the description adds the things annotations cannot: an external OpenAI-compatible endpoint must be configured, generation incurs a real monetary cost, and the call returns both a preset-vs-AI comparison image and a bake report. It also discloses that output can be written to disk or returned inline, which is behavior beyond the structured fields.

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-loads the action and its contract, then ordering/cost cautions, then return values and downstream wiring — a sensible information order with no filler sentences. It is dense with backticked identifiers, which makes it slightly heavy to parse but every clause carries operational meaning.

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 a 9-parameter mutation tool with no output schema and no annotations beyond hints, the description still supplies the return artifacts (comparison image, bake report) and the consumption path for the pack. Remaining gaps are minor and largely covered by the schema, e.g. default reuse of existing pack entries and failure behavior when the endpoint is unconfigured.

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; the description earns above that by explaining the pack's lifecycle — pass the resulting pack back in via `texturePack` / `texturePackPath` to `three_live_render` / `three_live_convert`. It does not add per-parameter detail for `only`, `force`, or the endpoint/model overrides beyond what the schema already says.

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 ('Generate the AI textures… save them in a texture pack') plus the exact discovery contract the scene must satisfy (`mesh.userData.xr = { material: { preset, prompt, size, seed } }`). It also positions itself relative to siblings by naming `three_live_render` and `three_live_convert` as downstream consumers, so an agent can tell this is the authoring step, not a render or convert step.

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 explicit sequencing ('Use it last, after geometry and presets look right') and hard prerequisites (configured image endpoint, per-texture cost), which is exactly the guidance an agent needs before spending money. It does not name a cheaper non-AI alternative for producing textures, so the when-not-to-use path is only implied by 'don't run it first'.

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