Skip to main content
Glama
threejs-devtools-mcp

threejs-devtools-mcp

by DmitriyGolub

set_material_property

Idempotent

Change a Three.js material property in the live browser scene by material or mesh name, with browser-only preview and undoable pending changes.

Instructions

[LIVE PREVIEW] Changes the scene in the browser only — NOT saved to source code, lost on reload. Recorded in pending_changes (→ code edits) and undoable with revert_changes. Set a material property. Accepts the material name or the name of a mesh that uses it.

Input Schema

NameRequiredDescriptionDefault
nameNoMaterial name, or name of a mesh using it
uuidNoMaterial UUID
valueYesHex string for colors ("#ff0000"), number for scalars, boolean for flags
propertyYescolor, emissive, emissiveIntensity, roughness, metalness, opacity, transparent, wireframe, visible, side, depthWrite, depthTest, alphaTest, flatShading, fog, envMapIntensity; physical: clearcoat, clearcoatRoughness, transmission, thickness, ior, sheen, sheenColor, sheenRoughness, iridescence, anisotropy, dispersion, specularIntensity, specularColor, attenuationColor

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.5.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / name / description
      Previous value: -"Material name or object/mesh name that owns the material"New value: +"Material name, or name of a mesh using it"
    • changedInput schema / properties / property / description
      Previous value: -"Property name: color, emissive, roughness, metalness, opacity, transparent, wireframe, visible, side, depthWrite, depthTest, alphaTest, flatShading, fog"New value: +"color, emissive, emissiveIntensity, roughness, metalness, opacity, transparent, wireframe, visible, side, depthWrite, depthTest, alphaTest, flatShading, fog, envMapIntensity; physical: clearcoat, clearcoatRoughness, transmission, thickness, ior, sheen, sheenColor, sheenRoughness, iridescence, anisotropy, dispersion, specularIntensity, specularColor, attenuationColor"
    • changedInput schema / properties / value / description
      Previous value: -"New value (hex string for colors, number for scalars, boolean for flags)"New value: +"Hex string for colors (\"#ff0000\"), number for scalars, boolean for flags"
    • addedInput schema / properties / value / type
      Added value: +[
      +  "string",
      +  "number",
      +  "boolean"
      +]
    • changedInput schema / required
      Previous value: -[
      -  "property"
      -]New value: +[
      +  "property",
      +  "value"
      +]
  2. First observedv0.4.1

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only declare readOnly=false, idempotent=true, destructive=false. The description goes well beyond them by disclosing that the change lives in the browser only, is lost on reload, feeds pending_changes for eventual code edits, and is reversible via revert_changes. That is exactly the behavioral context an agent needs for a mutation tool.

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

Conciseness5/5

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

Two compact sentences. The most consequential information (preview-only, lost on reload, recorded and undoable) is front-loaded before the plain purpose statement, and nothing is padded.

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 a 4-parameter mutation tool with full schema coverage, annotations and no output schema, the description supplies the missing persistence/undo semantics and the name-resolution note. An agent has everything needed to call it correctly and predict its side effects.

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

Parameters3/5

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

Schema description coverage is 100% and the value/property semantics (hex strings for colors, booleans for flags, full property enumeration) are already in the schema. The description only restates that name can be a material name or a mesh using it, which the schema also says, so it adds no new parameter meaning.

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?

States a specific verb+resource ('Set a material property') and adds scope ('scene in the browser only, not saved to source code'). This distinguishes it well from lookups like material_details and from related writers like set_texture or set_uniform, though no sibling is named explicitly.

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?

The LIVE PREVIEW framing tells the agent exactly what class of change this is: preview-only, recorded in pending_changes, undoable with revert_changes — effectively routing the agent to those siblings. It does not, however, say when to prefer this over material_details or set_texture/set_uniform directly.

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