Skip to main content
Glama

Apply mechanical three.js fixes

three_fix

Applies decision-free three.js upgrade fixes—API renames, addons imports, colorSpace, capped pixel ratio—as a dry run first, then one undoable write; re-run review after.

Instructions

Apply the review fixes that need no decision: renames with exactly the same meaning (BoxBufferGeometry -> BoxGeometry, THREE.Math -> MathUtils, applyMatrix -> applyMatrix4, three/examples/jsm -> three/addons, outputEncoding/encoding -> colorSpace, merged geometry utils) and a capped pixel ratio. Shows what it would change unless write is true; a write is one undoable step (three_undo). Run three_review afterwards; the rest needs a decision.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "three_fix"
  }
}

Input Schema

NameRequiredDescriptionDefault
onlyNorule ids to fix
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.
writeNo
targetNosame as path (older name)
rewritesNoalso apply the rewrites that change more than a name (render argument order, color.set(), the missing .js, TransformControls.getHelper()); the dry run lists them

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false and idempotentHint=false, but the description adds the crucial operational fact that this is dry-run by default and only mutates when write is true, plus that a write is a single undoable step via three_undo. It does not address partial-failure behavior across multiple files or what happens if the same write is repeated (relevant given idempotentHint=false).

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?

Front-loaded with the purpose, then the safety gate (dry run vs write), then the follow-up tool — a sensible order with no filler. The parenthetical rename list is long and makes one sentence dense, though each item earns its place as an example of an applicable rule.

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 mutating tool with no output schema, the definition does what's needed: it says the dry run reports the proposed changes and that writes are undoable as one step. It stops short of describing atomicity across files or what the post-write report contains, but the essential call-time information is present.

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 high (83%), so the schema carries most of the burden, but the description adds real meaning for two weak spots: it exemplifies the rule-id space for `only` by listing the concrete rename families, and it clarifies that `rewrites` is a strictly larger, riskier set whose members are surfaced by the dry run. `path`/`target` aliasing and `three` package resolution are left entirely to the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and a precisely scoped class of work: 'Apply the review fixes that need no decision', then enumerates the exact rewrites (BoxBufferGeometry -> BoxGeometry, THREE.Math -> MathUtils, outputEncoding -> colorSpace, etc.). This lets an agent separate this tool from three_review's judgment-requiring findings without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly frames the use case (mechanical, decision-free fixes) and the boundary ('the rest needs a decision'), and routes the agent: run three_review afterwards, and three_undo if a write must be reverted. The 'rewrites' parameter is likewise gated as opt-in because those changes alter more than a name.

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