Skip to main content
Glama

physics_raycast_3d

Cast a 3D ray in a physics scene to detect the first object hit, using origin, direction, and max distance.

Instructions

Cast a ray in 3D physics space (Rapier3D) and return the first hit.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
originYes
directionYes
layerMaskNo
maxDistanceYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.6/5.0
Behavior2/5

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

With no annotations, the description must disclose behavioral traits. It states the return is 'the first hit,' implying the closest intersection, but does not mention behavior on a miss (e.g., null result), whether the layer mask filters hits, or if the ray is infinitely thin. It lacks essential behavioral context for an agent to know what to expect.

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?

The description is a single, short sentence with no filler. It front-loads the verb and direct object, making it immediately clear. Perfectly concise and efficiently structured.

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

Completeness1/5

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

For a tool with 4 parameters, nested objects, no output schema, and no annotations, the description is severely incomplete. It does not explain the return value structure, error handling, coordinate system, or any usage nuances. An agent would not know how to interpret the result or handle edge cases, making the tool impractical to use reliably.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for parameter meaning. It does not mention any parameter, such as the format of origin/direction vectors, the meaning of maxDistance (units), or how layerMask is interpreted. The parameter names are self-explanatory but the description adds no semantics beyond them.

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?

The description states a specific verb and resource: 'Cast a ray in 3D physics space (Rapier3D) and return the first hit.' It clearly differentiates from sibling tools like physics_raycast_2d by specifying 3D and the physics engine. The purpose is unambiguous and distinct.

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

Usage Guidelines1/5

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

No guidance is provided on when to use this tool versus alternatives such as physics_raycast_2d or physics_overlap_circle. There are no explicit when-to-use, when-not-to-use, or alternative suggestions. The agent must infer usage from the name and description alone.

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