Skip to main content
Glama

spatial_query

Run spatial queries in Roblox Studio to raycast, find ground, detect flat areas, locate spawn positions, and analyze walkability.

Instructions

Spatial queries in workspace. Actions: raycast (filterList/filterType/ignoreWater), multi_raycast (rays[], max 50), in_radius, in_box, ground_height/find_ground (position or x/z), check_placement (is a box placeable at position), scan_area (heightmap grid), find_flat (flat build spots), find_spawn (clear spawn positions), analyze_walkable (walkability grid), spatial_map (all BasePart/Model positions), find_space (empty spot for a box), bounds (one path or paths[]), snap_grid (snap an instance pivot to a grid), collision. Areas: searchArea/area/region are {min:[x,y,z], max:[x,y,z]}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xNo
zNo
areaNoAlias for searchArea
axesNosnap_grid axes (default all)
pathNoInstance path for bounds / collision / snap_grid / spatial_map root. Alias: rootPath
raysNoRay list for multi_raycast (max 50)
sizeNo[x,y,z] box size for in_box / check_placement / find_space / scan_area (x,z used)
countNofind_spawn result count (default 10)
pathsNoMultiple paths for bounds
actionYes
centerNo
offsetNofind_ground vertical offset added to result (default 0)
originNo
radiusNo
minSizeNofind_flat minimum flat area size [x,z] (default [8,8])
paddingNofind_space clearance around the box (default 1)
gridSizeNosnap_grid / find_space grid size (default 4). Alias: gridSnap
gridSnapNoAlias for gridSize
maxSlopeNoMax slope degrees for find_flat (default 10) / analyze_walkable (default 45)
positionNo[x,y,z] for find_ground / check_placement / collision / find_space result bias
rootPathNoAlias for path (spatial_map)
rotationNo[rx,ry,rz] degrees for check_placement
directionNo
otherPathNoSecond instance for collision
spawnSizeNofind_spawn entity size (default [4,5,4])
toleranceNofind_flat height variation tolerance in studs (default 2)
filterListNoInstance paths to exclude/include in raycasts. Alias: filterInstances
filterTypeNoRaycast filter type (default Exclude)
maxResultsNo
minSpacingNofind_spawn min distance between results (default 10)
resolutionNoGrid resolution in studs for scan_area/analyze_walkable/find_flat (default 4)
searchAreaNoWorld AABB for find_flat / find_spawn / find_space / analyze_walkable. Alias: area
checkGroundNocheck_placement: also require ground support (default true)
ignoreWaterNo
maxDistanceNofind_ground max cast distance (default 1000)
includeModelsNospatial_map: include Model bounding boxes (default true)
maxStepHeightNoanalyze_walkable max step between cells (default 2)
preferOutdoorNofind_spawn: require open sky (default false)
characterHeightNoanalyze_walkable clearance height (default 5)
filterInstancesNoAlias for filterList
Behavior3/5

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

No annotations are provided, so the description must carry the burden. It discloses some behavioral details (e.g., max 50 rays, area format, parameter dependencies) but does not clarify which actions are read-only versus mutating (e.g., snap_grid appears to write) nor describe side effects or return structures.

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 packs a substantial amount of information into a single concise paragraph, front-loaded with the tool's purpose. Each action is listed with relevant parameters, and there is no redundancy. Readability could be improved with formatting, but it is efficient.

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 tool's complexity and lack of output schema or annotations, the description is incomplete. It does not explain what any of the 16 actions return, leaving significant ambiguity for an agent. It also doesn't clarify potential write side effects for actions like snap_grid.

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

Parameters4/5

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

While the schema covers 78% of parameters, the description adds crucial action-to-parameter mappings (e.g., 'raycast (filterList/filterType/ignoreWater)') that are absent from the schema. It also standardizes the area format and clarifies parameter alternatives (e.g., 'position or x/z').

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 explicitly states 'Spatial queries in workspace' and enumerates all supported actions, making the tool's purpose unmistakable. It distinguishes itself from sibling tools like query_instances and manage_terrain by focusing specifically on spatial operations.

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 description implies usage: it lists actions and area formats, so an agent can infer when to use it. However, it does not explicitly state when to prefer this tool over siblings or provide any exclusion criteria.

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/Allusia1/RoBridge'

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