Skip to main content
Glama
Roblox Studio MCP

Roblox Studio MCP

Collision groups

collision
Destructive

Manage which parts physically collide by creating groups, assigning parts, and setting group interactions; run cast and overlap queries to find real obstructions, clipping, and clear paths.

Instructions

Controls which parts physically collide with which.

This is the right answer to 'these should pass through each other'. The alternative — turning CanCollide off — disables collision against everything, so a ghost that should pass through walls also falls through the floor.

The order is: create a group, assign parts to it, then set what it is collidable with. A group with nothing assigned does nothing.

Assigning a Model assigns every part inside it, which is almost always what is meant.

Groups are not undoable and not scoped to a session: remove when one was created to try something and is no longer wanted, rather than leaving it registered in the place indefinitely. The built-in "Default" group cannot be removed.

Groups belong to a world, not to the place. The Workspace is the default and is what nearly every question is about; a WorldModel inside a ViewportFrame keeps its own separate registry, so pass worldModel to reach that one. A group of the same name in each is two different groups.

THE SAME TOOL ANSWERS WHAT IS ACTUALLY THERE. cast fires a ray, block, sphere or an existing part's own shape and reports the first thing it meets — the part, the hit point, the surface normal, the material and the distance. overlap lists everything inside a box, a radius, or overlapping an existing part.

That is the one question the Explorer cannot answer. A path tells you an instance exists and where its pivot sits; it does not tell you the door frame is clipping into the wall, that the spawn is buried a stud inside the floor, or that nothing stands between the turret and the player. Geometry wrong in exactly those ways looks perfect in inspect.

The queries live here because they ARE collision queries: they honour the very groups the other half of this tool manages. A cast run in the wrong collisionGroup reports a clear path through a wall the player cannot walk through — a wrong answer indistinguishable from a right one. A miss comes back as hit: false, which is a real answer and usually the one being checked for.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "collision"
  }
}

Input Schema

NameRequiredDescriptionDefault
atNooverlap only: the centre, for region "box" or "radius".
toNocast only: a point to aim at. Use this for sightlines — it saves working out a direction vector, which is where sign errors live.
fromNocast only: where the cast starts, e.g. "12, 0, 5".
onlyNocast/overlap: consider ONLY these instances and their descendants.
pathNooverlap region="part": the part to test against. cast shape="part": the part to sweep.
sizeNocast shape="block" or overlap region="box": the volume size. Defaults to "1, 1, 1" for a cast and "4, 4, 4" for an overlap.
withNocollidable only: the other group.
groupNoThe group's name. Required for everything but list.
limitNooverlap only: how many parts to list. Defaults to 50.
pathsNoassign only: parts or models to put in the group.
shapeNocast only: 'ray' is a line and the usual choice. 'block' and 'sphere' sweep a volume along the same path — use them when the thing moving has width, e.g. whether a character fits through a gap rather than whether a point does. 'part' sweeps the real shape of the part at `path` (meshes included); `from` and `size` override its start and size without moving it.
actionNoGroups: 'list' shows them and changes nothing, then 'create', 'assign', 'collidable', 'remove' (which unregisters a group entirely — not the same as un-assigning parts). Queries: 'cast' fires a shape and reports the first hit, 'overlap' lists what is inside a volume.list
ignoreNocast/overlap: skip these and their descendants. The usual case is the character doing the looking, which otherwise blocks its own cast at zero distance.
marginNocast only: inflate the swept shape by this many studs on every side. On a ray it makes a sphere cast of that radius.
radiusNocast shape="sphere" or overlap region="radius": the radius. Defaults to 1 for a cast and 4 for an overlap.
regionNooverlap only: 'box' and 'radius' need `at`; 'part' takes `path` and reports what overlaps that part — the fastest way to find things clipping through each other. Defaults to 'box'.
distanceNocast only: how far along `direction`. Defaults to 100.
studioIdNoTarget Studio; omit for the active one.
directionNocast only: which way to go, e.g. "0, -1, 0" for down. Used with `distance`.
visualizeNocast only: turn on Studio's shapecast overlay so the user sees the sweep (green hit, red miss). Stays on until switched off in Visualization Modes.
collidableNocollidable only: whether the two groups collide. False makes them pass through.
worldModelNoPath to a WorldModel whose own collision groups this call is about, e.g. "StarterGui.Preview.Viewport.WorldModel". Omit for the Workspace, which is what you want unless the parts in question live inside a ViewportFrame.
ignoreWaterNocast only: pass through terrain water instead of hitting it.
sizeGradientNocast only: grow or shrink the shape along the cast. 0.5 ends 50% larger (a cone, e.g. vision checks), -0.5 at half size, -1 to nothing (a funnel).
collisionGroupNocast/overlap: run the query as if from a part in this group. Required for a truthful answer in any place that uses groups.
respectCanCollideNocast/overlap: skip parts with CanCollide off. Off by default, matching the engine — leave it off to ask what is there, turn it on to ask what would stop a player.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv1.0.5
    • addedInput schema / properties / margin
      Added value: +{
      +  "description": "cast only: inflate the swept shape by this many studs on every side. On a ray it makes a sphere cast of that radius.",
      +  "minimum": 0,
      +  "type": "number"
      +}
    • changedInput schema / properties / path / description
      Previous value: -"overlap region=\"part\" only: the part to test against."New value: +"overlap region=\"part\": the part to test against. cast shape=\"part\": the part to sweep."
    • changedInput schema / properties / shape / description
      Previous value: -"cast only: 'ray' is a line and the usual choice. 'block' and 'sphere' sweep a volume along the same path — use them when the thing moving has width, e.g. whether a character fits through a gap rather than whether a point does."New value: +"cast only: 'ray' is a line and the usual choice. 'block' and 'sphere' sweep a volume along the same path — use them when the thing moving has width, e.g. whether a character fits through a gap rather than whether a point does. 'part' sweeps the real shape of the part at `path` (meshes included); `from` and `size` override its start and size without moving it."
    • changedInput schema / properties / shape / enum
      Previous value: -[
      -  "ray",
      -  "block",
      -  "sphere"
      -]New value: +[
      +  "ray",
      +  "block",
      +  "sphere",
      +  "part"
      +]
    • addedInput schema / properties / sizeGradient
      Added value: +{
      +  "description": "cast only: grow or shrink the shape along the cast. 0.5 ends 50% larger (a cone, e.g. vision checks), -0.5 at half size, -1 to nothing (a funnel).",
      +  "minimum": -1,
      +  "type": "number"
      +}
    • addedInput schema / properties / visualize
      Added value: +{
      +  "description": "cast only: turn on Studio's shapecast overlay so the user sees the sweep (green hit, red miss). Stays on until switched off in Visualization Modes.",
      +  "type": "boolean"
      +}
  2. Changed2 schema fields changedv0.8.6
    • changedInput schema / properties / radius / description
      Previous value: -"cast shape=\"sphere\" or overlap region=\"radius\": the radius."New value: +"cast shape=\"sphere\" or overlap region=\"radius\": the radius. Defaults to 1 for a cast and 4 for an overlap."
    • changedInput schema / properties / size / description
      Previous value: -"cast shape=\"block\" or overlap region=\"box\": the volume size."New value: +"cast shape=\"block\" or overlap region=\"box\": the volume size. Defaults to \"1, 1, 1\" for a cast and \"4, 4, 4\" for an overlap."
  3. Changed18 schema fields changedv0.6.8
    • changedInput schema / properties / action / description
      Previous value: -"'list' shows existing groups and changes nothing. 'remove' unregisters a group entirely — not the same as un-assigning parts from it."New value: +"Groups: 'list' shows them and changes nothing, then 'create', 'assign', 'collidable', 'remove' (which unregisters a group entirely — not the same as un-assigning parts). Queries: 'cast' fires a shape and reports the first hit, 'overlap' lists what is inside a volume."
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "list",
      -  "create",
      -  "assign",
      -  "collidable",
      -  "remove"
      -]New value: +[
      +  "list",
      +  "create",
      +  "assign",
      +  "collidable",
      +  "remove",
      +  "cast",
      +  "overlap"
      +]
    • addedInput schema / properties / at
      Added value: +{
      +  "description": "overlap only: the centre, for region \"box\" or \"radius\".",
      +  "type": "string"
      +}
    • addedInput schema / properties / collisionGroup
      Added value: +{
      +  "description": "cast/overlap: run the query as if from a part in this group. Required for a truthful answer in any place that uses groups.",
      +  "type": "string"
      +}
    • addedInput schema / properties / direction
      Added value: +{
      +  "description": "cast only: which way to go, e.g. \"0, -1, 0\" for down. Used with `distance`.",
      +  "type": "string"
      +}
    • addedInput schema / properties / distance
      Added value: +{
      +  "description": "cast only: how far along `direction`. Defaults to 100.",
      +  "type": "number"
      +}
    • addedInput schema / properties / from
      Added value: +{
      +  "description": "cast only: where the cast starts, e.g. \"12, 0, 5\".",
      +  "type": "string"
      +}
    • addedInput schema / properties / ignore
      Added value: +{
      +  "description": "cast/overlap: skip these and their descendants. The usual case is the character doing the looking, which otherwise blocks its own cast at zero distance.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / ignoreWater
      Added value: +{
      +  "description": "cast only: pass through terrain water instead of hitting it.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / limit
      Added value: +{
      +  "description": "overlap only: how many parts to list. Defaults to 50.",
      +  "maximum": 500,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / only
      Added value: +{
      +  "description": "cast/overlap: consider ONLY these instances and their descendants.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / path
      Added value: +{
      +  "description": "overlap region=\"part\" only: the part to test against.",
      +  "type": "string"
      +}
    • addedInput schema / properties / radius
      Added value: +{
      +  "description": "cast shape=\"sphere\" or overlap region=\"radius\": the radius.",
      +  "type": "number"
      +}
    • addedInput schema / properties / region
      Added value: +{
      +  "description": "overlap only: 'box' and 'radius' need `at`; 'part' takes `path` and reports what overlaps that part — the fastest way to find things clipping through each other. Defaults to 'box'.",
      +  "enum": [
      +    "box",
      +    "radius",
      +    "part"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / respectCanCollide
      Added value: +{
      +  "description": "cast/overlap: skip parts with CanCollide off. Off by default, matching the engine — leave it off to ask what is there, turn it on to ask what would stop a player.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / shape
      Added value: +{
      +  "description": "cast only: 'ray' is a line and the usual choice. 'block' and 'sphere' sweep a volume along the same path — use them when the thing moving has width, e.g. whether a character fits through a gap rather than whether a point does.",
      +  "enum": [
      +    "ray",
      +    "block",
      +    "sphere"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / size
      Added value: +{
      +  "description": "cast shape=\"block\" or overlap region=\"box\": the volume size.",
      +  "type": "string"
      +}
    • addedInput schema / properties / to
      Added value: +{
      +  "description": "cast only: a point to aim at. Use this for sightlines — it saves working out a direction vector, which is where sign errors live.",
      +  "type": "string"
      +}
  4. Changed1 schema field changedv0.6.5
    • addedInput schema / properties / worldModel
      Added value: +{
      +  "description": "Path to a WorldModel whose own collision groups this call is about, e.g. \"StarterGui.Preview.Viewport.WorldModel\". Omit for the Workspace, which is what you want unless the parts in question live inside a ViewportFrame.",
      +  "type": "string"
      +}
  5. First observedv0.1.8

TDQS

A4.6/5.0
Behavior4/5

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

Beyond the annotations, it discloses important behavioural traits: groups are not undoable, not session-scoped, the built-in Default group cannot be removed, and assigning a Model assigns every part inside it. It also explains that a cast miss returns hit: false and that visualize leaves a Studio overlay on until manually switched off. The annotations already flag destructive and non-idempotent behaviour, and the description meaningfully enriches that picture.

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 long but structured and front-loads the core concept and the main alternative before moving into workflow, caveats, and queries. Some passages, such as the uppercase claim about the Explorer and the repeated framing of inspect, are more rhetorical than necessary, but most sentences carry useful information for a 26-parameter tool.

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

Completeness5/5

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

For a complex tool with 26 parameters, no output schema, and two distinct modes, the description is unusually complete. It explains the group-management lifecycle, the query semantics, the worldModel scoping model, the meaning of a miss, and the interaction between queries and collision groups, leaving little that an agent would need to infer before invoking it correctly.

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?

Schema description coverage is 100%, so the schema already carries the bulk of parameter meaning, including enums and defaults. The description still adds operational semantics that are not obvious from the schema alone, notably the required create/assign/collidable order, the Model-assignment rule, and the fact that same-named groups in different worlds are distinct.

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 states a specific, concrete purpose: controlling which parts physically collide and answering spatial queries that depend on collision groups. It distinguishes the tool from the obvious alternatives, CanCollide and Explorer/inspect, and makes clear that cast/overlap are included because they honour the same collision groups.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives explicit when-to-use guidance, including the exact workflow of create, assign, then collidable, and warns that a group with nothing assigned does nothing. It also explains when to use cast versus overlap, when to pass worldModel, and when to remove a group rather than leave it registered.

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