Skip to main content
Glama

physics_raycast_2d

Cast a 2D ray to detect the first object hit, returning its position and surface normal for collision queries.

Instructions

Cast a ray in 2D physics space and return the first hit entity, hit point, and normal.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
originYes
directionYes
layerMaskNo
maxDistanceYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations provided, the description carries the behavioral burden. It clearly discloses the core outcome: cast a ray and return the first hit entity, hit point, and normal. However, it does not disclose behavior on no-hit cases, whether the ray interacts with all physics objects by default, or any coordinate-space assumptions, so transparency is partial.

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?

The description is a single concise, front-loaded sentence with no wasted words. It states the action and the key returned values immediately. It loses one point because its brevity causes it to skip important parameter and edge-case information.

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

Completeness2/5

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

Given four parameters, no annotations, no output schema, and 0% schema description coverage, this description is not complete enough. It names the key return values but leaves out no-hit behavior, layer mask semantics, maxDistance interpretation, and whether the raycast is read-only, which an agent needs to call the tool confidently.

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%, and the description adds no meaning for any of the four parameters. It does not mention origin, direction, maxDistance, or layerMask, leaving the agent to rely entirely on the bare schema with no explanation of semantics, normalization, units, or how the layer mask affects results.

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 names a specific verb and resource: cast a ray in 2D physics space and return the first hit entity, point, and normal. The '2D' qualifier clearly distinguishes this from the sibling physics_raycast_3d, so an agent can separate it by name and description.

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?

The context is inferred from '2D physics space', which suggests when to use it versus physics_raycast_3d or navmesh tools, but there is no explicit statement about when to prefer this tool or when not to use it. The usage guidance is implied rather than stated.

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