Skip to main content
Glama
threejs-devtools-mcp

threejs-devtools-mcp

by DmitriyGolub

run_js

Destructive

Debug Three.js visuals by executing JavaScript in the live page with scene, renderer, camera, and gl in scope; return values for inspection.

Instructions

[DEBUG VISUAL] Temporary visual aid in the browser. Nothing to put in code. Run JavaScript in the page with scene, renderer, camera, gl in scope; return a value to get it back. Changes made here are NOT recorded in pending_changes — prefer the set_* tools for anything the user may want to keep.

Input Schema

NameRequiredDescriptionDefault
codeYesJavaScript body. Vars: scene, renderer, camera, gl

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.5.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / code / description
      Previous value: -"JavaScript code. Available vars: scene, renderer, camera, gl. Use return for results."New value: +"JavaScript body. Vars: scene, renderer, camera, gl"
  2. First observedv0.4.1

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false and openWorldHint=true, so the safety profile is partly covered. The description adds two things annotations cannot: the injected scope (scene, renderer, camera, gl) and the crucial fact that changes are NOT recorded in pending_changes, meaning revert_changes won't undo them. It stops short of stating permission/sandbox limits or that arbitrary scene mutation is possible.

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 two substantive sentences are dense and front-loaded with the alternative-tool guidance. However, the leading '[DEBUG VISUAL] ... Nothing to put in code.' fragment is unexplained, contradicts the required `code` parameter, and does not earn its place in a short description.

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?

With no output schema, the description correctly explains how results come back (via `return`), names the injected globals, and flags the non-persistent, un-revertable nature of edits — all the essentials for calling it safely. What's missing is any note on execution constraints or failure behavior for arbitrary code.

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% and the single parameter's description already lists the injected variables, so the baseline would be 3. The description earns above baseline by documenting the return contract ('return' a value to get it back), which is behavioral meaning the schema does not convey.

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?

The core sentence states a specific verb+resource: run JavaScript in the page, with the four injected variables, returning a value. It distinguishes itself from the set_* family by scope, but the stray leading fragment '[DEBUG VISUAL] Temporary visual aid in the browser. Nothing to put in code.' directly conflicts with a tool whose only required parameter is `code` and muddies an otherwise clear purpose.

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?

It gives one explicit routing rule: prefer the set_* tools for anything the user may want to keep, because run_js edits are not captured in pending_changes. That is a concrete when-to-use/when-not-to-use signal, though it doesn't contrast with read-only siblings like scene_tree or renderer_info that an agent might reach for instead.

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