Skip to main content
Glama
threejs-devtools-mcp

threejs-devtools-mcp

by DmitriyGolub

raycast

Read-onlyIdempotent

Cast a ray from the camera through screen coordinates to identify and return 3D objects hit, enabling picking and selection in Three.js scenes.

Instructions

[INSPECT] Read-only. Cast a ray from the camera through screen coordinates and return hit objects.

Input Schema

NameRequiredDescriptionDefault
xYesNormalized device X (-1 to 1, 0 = center)
yYesNormalized device Y (-1 to 1, 0 = center)
maxHitsNoMax hits (default: 10)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.5.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / maxHits / description
      Previous value: -"Maximum hits to return (default: 10)"New value: +"Max hits (default: 10)"
    • changedInput schema / properties / x / description
      Previous value: -"Normalized device X coordinate (-1 to 1, 0 = center)"New value: +"Normalized device X (-1 to 1, 0 = center)"
    • changedInput schema / properties / y / description
      Previous value: -"Normalized device Y coordinate (-1 to 1, 0 = center)"New value: +"Normalized device Y (-1 to 1, 0 = center)"
  2. First observedv0.4.1

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the '[INSPECT] Read-only' prefix largely restates structured data. The description does add that the ray originates from the camera and that hit objects are returned, but says nothing about hit ordering, depth of returned data, or how maxHits truncates results.

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 compact lines with the category tag and the core action front-loaded; no filler sentences to trim.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, so the description carries the burden of explaining the return value. 'Return hit objects' is directionally useful but leaves out what a hit contains (object reference, distance, intersection point, normal), which is central to using a raycast result. Adequate but with a real gap.

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 coverage is 100%, so x, y, and maxHits are fully documented in the schema itself. The description's 'screen coordinates' phrasing actually diverges slightly from the schema's 'normalized device X/Y (-1 to 1)', adding no clarifying detail. Baseline 3 is appropriate when the schema does the work.

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 mechanism: 'Cast a ray from the camera through screen coordinates and return hit objects.' An agent can tell this is a spatial picking/inspection operation. It does not, however, distinguish itself from siblings like click_inspect, find_objects, or bounding_boxes, which could plausibly be confused with it.

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

Usage Guidelines2/5

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

There is no statement of when to use this tool versus alternatives such as click_inspect (which presumably also resolves what is under a point) or object_details. The '[INSPECT]' tag hints at a category but gives no selection criteria or exclusions.

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