Skip to main content
Glama

three.js API lookup

three_api
Read-onlyIdempotent

Reads the exact API of a three.js class, method or constant from the installed version and returns its signature and correct import path, so you stop guessing when writing code.

Instructions

Exact API of a three.js class, constant or member, read from the three version installed in the project (not from memory): constructor, properties, methods, deprecations and the right import path ('three' or 'three/addons/...'). Use it before writing or changing three.js code you are not sure about. Query: Mesh, WebGLRenderer.setPixelRatio, OrbitControls. Unknown names get did-you-mean suggestions. 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": {
      "query": "<query>"
    },
    "name": "three_api"
  }
}

Input Schema

NameRequiredDescriptionDefault
fullNofull class description
pathNoProject folder, or a file or folder in it (relative to the server's folder; default: the project).
queryYesClass, Class.member or constant, e.g. WebGLRenderer.setSize
threeNoPath to a three package folder, when it is not in node_modules above the project.
inheritedNoalso list inherited members

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?

The annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and a closed world, so the description's trailing 'Read-only' is largely redundant. Beyond that it adds two genuinely useful behaviors: results come from the installed three version rather than model memory, and unknown names return did-you-mean suggestions. It says nothing about output shape, size limits or performance, so the added context is real but thin.

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?

A single dense paragraph that front-loads what the tool returns, then when to use it, then query examples and error behavior. Every clause carries information, with only the trailing 'Read-only' wasting space given the annotations.

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 does the necessary work of enumerating what a result contains (constructor, properties, methods, deprecations, import path) plus unknown-name handling. For a five-parameter lookup tool this is close to complete; the optional flags are left entirely to the schema, which is acceptable at 100% coverage.

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 five parameters (query, full, inherited, path, three) are already documented in the schema and the baseline of 3 applies. The description contributes query syntax examples ('Mesh', 'WebGLRenderer.setPixelRatio', 'OrbitControls') and the 'three' vs 'three/addons/...' import-path distinction, but does not clarify what 'full' or 'inherited' change about the result.

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?

A specific verb-plus-resource statement: the exact API of a three.js class, constant or member, with the concrete scope of constructor, properties, methods, deprecations and import path. The clause 'read from the three version installed in the project (not from memory)' distinguishes it from generic knowledge lookups, though it does not name a sibling such as three_search or three_types to draw the boundary.

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?

'Use it before writing or changing three.js code you are not sure about' gives a clear trigger condition, and the sample queries show what a valid call looks like. It stops short of explicit exclusions or naming an alternative tool for adjacent needs (searching docs, checking installed version), which keeps it below a 5.

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