Skip to main content
Glama
threejs-devtools-mcp

threejs-devtools-mcp

by DmitriyGolub

set_uniform

Idempotent

Change a ShaderMaterial uniform in the live browser preview without editing source; changes are tracked and can be reverted.

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 ShaderMaterial uniform.

Input Schema

NameRequiredDescriptionDefault
nameNoMaterial name
uuidNoMaterial UUID
valueYesHex string for Color, {x,y,z} for vectors, number/boolean for scalars
uniformYesUniform name, e.g. uTime, uColor

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.5.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / uniform / description
      Previous value: -"Uniform name (e.g. uHorizonColor, uOpacity)"New value: +"Uniform name, e.g. uTime, uColor"
    • addedInput schema / properties / value / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "boolean"
      +  },
      +  {
      +    "items": {
      +      "type": "number"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "properties": {
      +      "w": {
      +        "type": "number"
      +      },
      +      "x": {
      +        "type": "number"
      +      },
      +      "y": {
      +        "type": "number"
      +      },
      +      "z": {
      +        "type": "number"
      +      }
      +    },
      +    "required": [
      +      "x",
      +      "y"
      +    ],
      +    "type": "object"
      +  }
      +]
    • changedInput schema / properties / value / description
      Previous value: -"New value: hex string for Color, {x,y,z} for Vector3, number for float"New value: +"Hex string for Color, {x,y,z} for vectors, number/boolean for scalars"
    • changedInput schema / required
      Previous value: -[
      -  "uniform"
      -]New value: +[
      +  "uniform",
      +  "value"
      +]
  2. First observedv0.4.1

TDQS

A3.9/5.0
Behavior5/5

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

Annotations cover only the safety profile (not read-only, not destructive, idempotent, closed-world). The description adds materially more: changes are browser-only, not written to source code, discarded on reload, tracked in pending_changes, and reversible via revert_changes. This is exactly the ephemerality/undo context annotations cannot express.

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?

Compact at three short segments with zero filler, and the [LIVE PREVIEW] tag front-loads the most important caveat. The core purpose statement is buried at the end rather than leading, which is the only structural weakness.

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 mutation tool with no output schema, the description covers the critical operational risk (lost on reload) and the recovery path. It omits how the target material is resolved (name vs uuid) and what happens if the uniform does not exist on the material, minor gaps given the complete schema.

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%, so all four parameters are already documented, including value formatting (hex for Color, {x,y,z} for vectors). The description adds no parameter detail, so the baseline 3 for high-coverage schemas applies.

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 ShaderMaterial uniform"), which cleanly separates it from the generic set_material_property sibling. It does not explicitly name that sibling as the alternative for non-shader properties, so it stops short of a 5, but the scope is unambiguous.

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?

The description gives strong context on the nature of the change (browser-only live preview, lost on reload) and routes to pending_changes/revert_changes for persistence and undo. However, it never states when NOT to use it or which sibling to pick when you want a source-persisted edit, leaving that to inference.

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