Skip to main content
Glama
threejs-devtools-mcp

threejs-devtools-mcp

by DmitriyGolub

set_layers

Idempotent

Set layer visibility or a layer mask on an object or camera in a live Three.js scene. Changes are browser-only, recorded as pending edits, and undoable.

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 layers on an object or the camera.

Input Schema

NameRequiredDescriptionDefault
maskNoSet the bitmask directly
nameNoObject name
uuidNoObject UUID
layerNoLayer 0-31 to enable/disable
targetNo"camera" to target the camera
enabledNoEnable or disable that layer

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.5.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / enabled / description
      Previous value: -"Enable or disable the layer"New value: +"Enable or disable that layer"
    • changedInput schema / properties / layer / description
      Previous value: -"Layer number (0-31) to enable/disable"New value: +"Layer 0-31 to enable/disable"
    • changedInput schema / properties / mask / description
      Previous value: -"Set layer mask directly (bitmask)"New value: +"Set the bitmask directly"
    • addedInput schema / properties / target / const
      Added value: +"camera"
  2. First observedv0.4.1

TDQS

A4/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses that changes are browser-only, not saved to source, lost on reload, recorded in pending_changes (which becomes code edits), and reversible via revert_changes. That is exactly the persistence, side-effect and undo context an agent needs for a mutation.

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 sentences, zero waste, with the critical live-preview caveat front-loaded in a bracketed tag before the actual operation is stated.

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 6-param optional-only mutation with no output schema, the description covers the essential behavioral context (persistence, undo, scope). It does not clarify how mask relates to layer+enabled, but the schema descriptions carry that burden.

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 each parameter (mask, name, uuid, layer, target, enabled) is already documented. The description only echoes the 'object or camera' target scope and adds no syntax or interaction detail, so baseline 3 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 and resource ('Set layers on an object or the camera'), which is clearly distinct from the read-only sibling layer_details. It does not explicitly name or route to a sibling, so it stops just short of a 5.

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 by the [LIVE PREVIEW] framing and the pointer to pending_changes/revert_changes, which tells the agent this is a transient in-browser mutation. However, no explicit when-to-use/when-not guidance or alternative is offered (e.g., when to prefer editing source vs. this preview tool).

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