collision_add_shape
Add a collision shape to a CollisionObject2D or CollisionObject3D node in a Godot scene. Specify the shape type and properties to create rectangle, circle, box, sphere, or capsule colliders.
Instructions
Add a collision shape to a CollisionObject2D/3D node.
Category: Collision
Args: project_path: Path to the Godot project directory scene_path: Path to the scene file (relative to project) node_path: Path to the CollisionObject node (e.g., "Player", "Enemy/CollisionObject2D") shape_type: Type of collision shape (RectangleShape2D, CircleShape2D, BoxShape3D, SphereShape3D, CapsuleShape2D, etc.) shape_properties: JSON string of shape properties (e.g., '{"size": [10, 20]}' for rectangle)
Returns: Success message or error description
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"project_path": "<project_path>",
"scene_path": "<scene_path>",
"node_path": "<node_path>",
"shape_type": "<shape_type>"
},
"name": "collision_add_shape"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_path | Yes | ||
| scene_path | Yes | ||
| node_path | Yes | ||
| shape_type | Yes | ||
| shape_properties | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |