Skip to main content
Glama

cocos_add_fixed_joint_2d

Attach a fixed joint to rigidly connect two physics bodies in Cocos Creator, creating breakable structures with configurable anchor points and joint properties.

Instructions

Attach cc.FixedJoint2D — rigidly fuses two bodies (breakable structures).

Named "weld" in Box2D; replaces the prior cocos_add_weld_joint2d which emitted cc.WeldJoint2D (not a real 3.8 class).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scene_pathYes
node_idYes
connected_body_idNo
anchor_xNo
anchor_yNo
connected_anchor_xNo
connected_anchor_yNo
angleNo
frequencyNo
damping_ratioNo
collide_connectedNo

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 full burden for behavioral disclosure. It mentions the joint creates 'breakable structures' (implying some durability characteristic) and provides historical context about Box2D naming and deprecated tools. However, it doesn't describe what happens when the joint is attached (e.g., whether it modifies existing nodes, requires specific physics bodies, has performance implications, or what the output contains). For a physics tool with 11 parameters, this is insufficient behavioral context.

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 appropriately concise with three sentences that each add value: the core functionality, the Box2D naming context, and the historical replacement note. There's no wasted verbiage, and the information is front-loaded with the primary purpose. It could be slightly improved with clearer structure, but it's efficient overall.

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 complexity (physics joint tool with 11 parameters), no annotations, and an output schema (which means return values are documented elsewhere), the description is incomplete. It explains what the tool does at a high level but provides no guidance on usage, no parameter semantics, and minimal behavioral context. For a tool that presumably modifies scene physics, this leaves significant gaps in understanding how to use it effectively.

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

Parameters2/5

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

Schema description coverage is 0%, meaning none of the 11 parameters have descriptions in the schema. The tool description provides no information about any parameters—it doesn't explain what 'scene_path', 'node_id', 'anchor_x', 'frequency', or any other parameters mean or how they affect the joint creation. With 11 parameters (9 with defaults) and zero coverage, the description fails to compensate for the schema's deficiencies.

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 tool's purpose: 'Attach cc.FixedJoint2D — rigidly fuses two bodies (breakable structures).' It provides a specific verb ('Attach') and resource ('cc.FixedJoint2D'), and explains the effect ('rigidly fuses two bodies'). However, it doesn't explicitly distinguish this joint type from other joint tools in the sibling list (e.g., distance_joint2d, hinge_joint2d, mouse_joint2d), 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. It mentions that it 'replaces the prior cocos_add_weld_joint2d', but this is historical context rather than practical usage advice. There's no indication of prerequisites, when this joint type is appropriate, or how it differs from other joint tools available in the system.

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