Skip to main content
Glama

Explain a three.js error

three_explain
Read-onlyIdempotent

Explains three.js console, build, test, or bug-report errors, giving likely cause and fix for import paths, missing exports, decoders, NaN geometry, shaders, CORS, and WebGPU init.

Instructions

Likely cause and fix of a three.js error or warning from the console, a build, a test run or a bug report: missing exports and wrong import paths (with the right path for the installed version), classes that no longer exist, two copies of three, objects used before a model loaded, 404 HTML instead of a model, Draco/KTX2 decoders, NaN geometry, lost contexts, shader compile errors, CORS, file://, WebGPU init. Paste the message as it was printed. Read-only.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "message": "<message>"
    },
    "name": "three_explain"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoProject folder, or a file or folder in it (relative to the server's folder; default: the project).
threeNoPath to a three package folder, when it is not in node_modules above the project.
messageYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false and openWorldHint=false, so the trailing 'Read-only.' is redundant restatement rather than added value. What the description does add is the diagnostic surface area and the hint that a fix can be version-aware ('with the right path for the installed version'). It says nothing about output form (a cause/fix pair?) or whether a successful diagnosis implies the tool inspected files, which is a real gap given it can consult the installed three package.

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?

Purpose is front-loaded in the first clause, followed by a scannable comma list of supported error classes and a single imperative about input format. The list is long but each item maps to a distinct diagnosable failure, so it earns its space as an in-scope test. Deductions only for the fragment-list syntax and the redundant 'Read-only.' tail.

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 four annotations covering safety and idempotency, no output schema, and three mostly-documented parameters, the remaining burden on the description was scope and input handling — both delivered. The one loose end is whether the agent should supply surrounding code or file contents alongside the message; the definition implies message-only but never says so.

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?

The `message` parameter is the only one without a schema description (67% coverage), and the description compensates with the essential rule: paste the message verbatim as printed, not paraphrased — a constraint that materially affects result quality. `path` and `three` are already covered in the schema, and 'with the right path for the installed version' reinforces that `three` matters for version-specific answers without repeating the schema text.

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?

Opens with a specific verb+resource: 'Likely cause and fix of a three.js error or warning', then enumerates the diagnosable classes (missing exports, duplicate three copies, Draco/KTX2 decoders, NaN geometry, shader compile errors, CORS, file://, WebGPU init). This leaves no ambiguity about what the tool does. It stops short of naming which sibling to use instead (three_check, three_doctor, three_fix), so an agent must infer the boundary with those tools.

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?

It scopes the trigger well — errors/warnings 'from the console, a build, a test run or a bug report' — and gives one operational rule ('Paste the message as it was printed'). However it never says when NOT to use it or which sibling handles adjacent needs (auditing code, fixing files), leaving the routing decision implied rather than stated.

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