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.
Behavior2/5

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

With no annotations provided, the description carries the full disclosure burden but fails to state whether operations are read-only, what happens on failure (e.g., raycast misses), performance characteristics of expensive operations like 'scan_area', or if results are cached. The '[PRO]' prefix is unexplained.

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 single-line, colon-delimited list efficiently packs 13 distinct capabilities without extraneous prose. The '[PRO]' prefix adds noise, but the structure appropriately front-loads the tool's scope as a capability index.

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

Completeness3/5

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

Given 37 parameters across 13 distinct sub-operations and no output schema, the description adequately scopes the tool's capabilities by enumerating all supported actions. However, it omits critical behavioral context like return value structures, rate limits, or the fact that 'multi_raycast' is capped at 50 rays (which only appears in the schema).

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 description coverage is 100%, establishing a baseline of 3. The description lists action names that correspond to the 'action' enum, reinforcing the schema, but adds no semantic guidance beyond what the schema already provides (e.g., no explanation of when to use 'filterType' versus 'ignorePaths').

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

Purpose4/5

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

The description lists 13 specific spatial operations (raycast, find_ground, etc.) under the header 'Spatial queries', clearly indicating this is a geometric/spatial analysis tool. However, it lacks explicit differentiation from the sibling tool 'query_instances', leaving potential ambiguity about when to use spatial queries versus general instance queries.

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?

The description provides no guidance on when to use this tool versus alternatives (e.g., 'query_instances' for property lookup or 'manage_physics' for physics manipulation), nor does it mention prerequisites, cost implications, or action-specific requirements like 'use raycast before find_ground'.

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