Skip to main content
Glama

cocos_add_hinge_joint2d

Add a hinge joint to 2D physics objects in Cocos Creator for rotational movement like doors, wheels, or pendulums.

Instructions

Attach cc.HingeJoint2D — pivots around a shared anchor (door, wheel, pendulum).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scene_pathYes
node_idYes
connected_body_idNo
anchor_xNo
anchor_yNo
connected_anchor_xNo
connected_anchor_yNo
enable_motorNo
motor_speedNo
max_motor_torqueNo
enable_limitNo
lower_angleNo
upper_angleNo
collide_connectedNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions 'Attach' which implies a mutation operation, but doesn't disclose critical behavioral traits like whether this requires specific permissions, if it's destructive to existing components, error conditions, or what the output contains. The description adds minimal context beyond the basic action.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise (one sentence) and front-loaded with the core action. Every word earns its place by specifying the component type and providing illustrative examples without unnecessary elaboration.

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 tool's complexity (14 parameters, physics joint creation), absence of annotations, and 0% schema coverage, the description is inadequate. While an output schema exists (which helps with return values), the description doesn't address the numerous parameters, behavioral implications, or usage context needed for effective tool invocation.

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?

With 0% schema description coverage and 14 parameters (only 2 required), the description provides no information about any parameters. It doesn't explain what 'scene_path', 'node_id', or any other parameters mean, their units, or how they interact. The description fails to compensate for the complete lack of schema documentation.

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.HingeJoint2D'), and provides concrete examples of use cases ('door, wheel, pendulum'). It distinguishes itself from sibling tools by specifying a particular joint type (HingeJoint2D), though it doesn't explicitly contrast with other joint tools like 'cocos_add_distance_joint2d' or 'cocos_add_wheel_joint2d'.

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, prerequisites, or constraints. While the examples imply typical applications, there's no explicit mention of when this joint type is appropriate compared to other joint types available in the sibling list.

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