Skip to main content
Glama

cocos_add_rigidbody_3d

Add physics simulation to 3D objects in Cocos Creator by attaching rigid body components with configurable mass, gravity, damping, and movement constraints.

Instructions

Attach cc.RigidBody (3D).

body_type: 1=DYNAMIC (default), 2=STATIC, 4=KINEMATIC. Values are engine's ERigidBodyType bitmask, NOT contiguous 0/1/2 like the 2D API. linear_factor / angular_factor lock motion on a per-axis basis (set component to 0 to freeze that axis, 1 for free movement).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scene_pathYes
node_idYes
body_typeNo
massNo
use_gravityNo
allow_sleepNo
linear_dampingNo
angular_dampingNo
linear_factor_xNo
linear_factor_yNo
linear_factor_zNo
angular_factor_xNo
angular_factor_yNo
angular_factor_zNo
groupNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions attaching a rigid body but doesn't explain if this is a destructive operation, what permissions are needed, how it affects the scene, or error conditions. The focus on parameter semantics leaves behavioral traits largely unaddressed.

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 front-loaded with the main purpose, followed by essential parameter details in a compact format. It avoids unnecessary fluff, but the lack of structure (e.g., bullet points or clearer separation) slightly reduces readability, though it remains efficient.

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?

For a tool with 15 parameters, no annotations, and an output schema (which reduces the need to describe return values), the description is moderately complete. It covers critical parameter semantics but misses behavioral context, usage guidelines, and broader integration details, leaving gaps in overall understanding.

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

Parameters5/5

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

Given 0% schema description coverage and 15 parameters, the description adds significant value by explaining key parameters like body_type (with enum values and a warning about bitmask vs. contiguous indexing) and linear/angular_factor (with axis-locking behavior). This compensates well for the lack of schema descriptions.

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 clearly states the verb ('Attach') and resource ('cc.RigidBody (3D)'), making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'cocos_add_rigidbody2d' or other physics-related tools, which prevents a perfect score.

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, such as the 2D version or other physics components. It lacks context about prerequisites, typical use cases, or exclusions, offering only technical parameter details without usage context.

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/chenShengBiao/cocos-mcp'

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