Skip to main content
Glama

spatial_query

Perform spatial queries in Roblox including raycasting, ground detection, placement checks, area scanning, and collision detection.

Instructions

[PRO] Spatial queries: raycast, find ground, check placement, multi-raycast, scan area, find flat areas, find spawn positions, analyze walkable, spatial map, find empty space, get bounds, snap to grid, check collision.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYes[PRO] Spatial action. raycast: single ray. find_ground: ground below point. check_placement: collision-free placement check. multi_raycast: batch rays. scan_area: heightmap generation. find_flat: flat areas for building. find_spawn: spawn positions. analyze_walkable: walkability grid. spatial_map: all BasePart positions. find_space: empty space for object. bounds: bounding box. snap_grid: snap position to grid. collision: AABB collision check.
originNoRay origin as Vector3. Used by: raycast.
directionNoRay direction and length as Vector3. Used by: raycast.
maxDistanceNoMaximum distance for ground search. Used by: find_ground. Default: 1000.
positionNoPosition as Vector3. Used by: find_ground (cast from here), check_placement (center), collision (hypothetical position).
sizeNoSize as Vector3. Used by: check_placement (object size), find_space (required space size), scan_area (area X/Z dimensions).
filterTypeNoRaycast filter type. Used by: raycast, multi_raycast. Default: "Exclude".
filterListNoInstance paths to filter. Used by: raycast, multi_raycast, find_ground, check_placement, scan_area. Alias: filterInstances.
filterInstancesNoInstance paths to filter (alias for filterList). Used by: raycast, multi_raycast, find_ground, check_placement, scan_area.
ignoreWaterNoIgnore terrain water. Used by: raycast, multi_raycast. Default: false.
raysNoArray of ray specifications. Used by: multi_raycast. Max 50 rays.
centerNoCenter point for area scan. Used by: scan_area.
areaNoBounding box for analysis. Used by: analyze_walkable. Contains min/max.
searchAreaNoBounding box for search. Used by: find_flat, find_spawn, find_space.
minSizeNoMinimum flat area size. Used by: find_flat.
maxSlopeNoMaximum slope in degrees. Used by: find_flat (default: 10), analyze_walkable (default: 45).
resolutionNoGrid resolution in studs. Used by: scan_area, analyze_walkable. Default: 4.
gridSizeNoGrid snap size in studs. Used by: snap_grid (default: 4), find_space (default: 4).
pathNoInstance path. Used by: bounds (optional), snap_grid (required), collision (required), spatial_map (rootPath alias).
pathsNoMultiple instance paths for batch bounds. Used by: bounds.
toleranceNoHeight variation tolerance in studs. Used by: find_flat.
gridSnapNoGrid snap size. Alias for gridSize.
axesNoAxes to snap. Used by: snap_grid. Default: ["x","y","z"]. Use ["x","z"] for horizontal only.
ignorePathsNoInstance paths to ignore in collision check. Used by: collision.
offsetNoVertical offset for ground position. Used by: find_ground. Default: 0.
rotationNoRotation in degrees. Used by: check_placement.
checkGroundNoVerify ground support for placement. Used by: check_placement. Default: true.
spawnSizeNoSize of spawning entity. Used by: find_spawn. Default: {x:4, y:5, z:4}.
minSpacingNoMinimum distance between spawn positions. Used by: find_spawn. Default: 10.
preferOutdoorNoPrefer open sky positions. Used by: find_spawn. Default: false.
countNoNumber of results to find. Used by: find_spawn. Default: 10.
characterHeightNoCharacter height for clearance checks. Used by: analyze_walkable. Default: 5.
maxStepHeightNoMaximum step height. Used by: analyze_walkable. Default: 2.
rootPathNoRoot path for spatial map scan. Used by: spatial_map. Default: "game.Workspace".
includeModelsNoInclude Model bounding boxes. Used by: spatial_map. Default: true.
maxResultsNoMaximum results. Used by: spatial_map (default: 500), scan_area (default: 500), find_flat (default: 10).
paddingNoMinimum distance from other objects. Used by: find_space. Default: 1.
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. It does not mention side effects, read-only status, performance costs, or error handling. For a tool with 13 actions, this is insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single line listing actions—concise but unstructured. It lacks hierarchy or context that would help an agent quickly grasp the tool's capabilities.

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 the complexity (37 parameters, 13 actions), the description is minimal. There is no explanation of return values, error handling, or how actions relate to each other. The schema covers parameter details but the description fails to tie everything together.

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% and each parameter has schema descriptions specifying which action it belongs to, defaults, and aliases. The tool description adds no further parameter information, so baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description lists 13 spatial actions (e.g., raycast, find_ground) but lacks a single clear verb+resource statement. It reads as a menu rather than a coherent purpose, making it adequate but not distinctive from sibling tools.

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?

No guidance on when to use this tool versus alternatives. Sibling tools like query_instances or manage_physics could overlap, but no distinctions are provided. The agent must infer usage from the action names alone.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hope1026/roblox-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server