Skip to main content
Glama

raycast

Read-only

Cast a ray into a 3D scene to identify what it hits, enabling spatial queries and collision checks.

Instructions

Cast a ray into the scene and return what it hits. Useful for spatial queries.

Input Schema

NameRequiredDescriptionDefault
originYes[x, y, z] start point
directionYes[dx, dy, dz] direction; it is normalised
max_distanceNoThe longest the ray goes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.2

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered. The description adds that it returns hit results, but says nothing about coordinate space (world vs local), what kinds of geometry are hit, or whether the ray stops at the first hit or returns all hits.

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?

Two short sentences with the core action front-loaded. The second sentence is mild filler but not harmful.

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?

An output schema exists and all three parameters are documented, so the description only needs to frame the operation. The one meaningful omission is the coordinate frame of origin/direction, which matters for a 3D ray query.

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%, including the note that direction is normalised and the default max_distance of 1000. The description adds no parameter meaning beyond the schema, so the baseline of 3 applies.

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 resource: cast a ray into the scene and return the hit result. That is clearly distinct from siblings like get_prim_bounds or inspect_prim, though the description never names an alternative to reinforce the distinction.

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?

'Useful for spatial queries' implies the use case but gives no explicit when-to-use or when-not-to-use guidance, and no alternative is named for agents deciding between raycast and get_prim_bounds or get_prim_properties.

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