Skip to main content
Glama

spatial_query

Perform spatial analysis in Roblox environments to detect collisions, find suitable positions, and analyze terrain geometry for building and navigation.

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.

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