Skip to main content
Glama

cocos_set_physics_2d_config

Configure 2D physics parameters like gravity, timestep, and solver iterations for Cocos Creator projects to control physics simulation behavior.

Instructions

Configure 2D physics: gravity, timestep, solver iterations.

Default gravity is (0, -320). Must call this before build if using physics.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_pathYes
gravity_xNo
gravity_yNo
fixed_time_stepNo
velocity_iterationsNo
position_iterationsNo
allow_sleepNo
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses that the tool configures physics settings and mentions a default gravity value, which is useful behavioral context. However, it lacks details on permissions needed, whether changes are reversible, or any rate limits, leaving significant gaps for a mutation tool.

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 and front-loaded, with two sentences that directly state the tool's purpose and a critical usage guideline. Every sentence earns its place, and there is no wasted verbiage.

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?

Given the complexity (7 parameters, mutation tool) and no annotations or output schema, the description is incomplete. It covers the purpose and a key guideline but lacks details on parameter semantics, behavioral traits, and return values. This is adequate for a basic understanding but has clear gaps for effective tool use.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must compensate. It lists the parameters (gravity, timestep, solver iterations) and provides a default gravity value, adding some meaning beyond the schema. However, it does not explain the purpose or typical values for parameters like velocity_iterations or allow_sleep, leaving many parameters inadequately documented.

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: 'Configure 2D physics: gravity, timestep, solver iterations.' It specifies the verb ('configure') and resource ('2D physics'), and lists the key configurable parameters. However, it does not explicitly differentiate from its sibling 'cocos_set_physics_3d_config', which is a notable gap.

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

Usage Guidelines4/5

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

The description provides clear usage context: 'Must call this before build if using physics.' This gives a specific prerequisite and timing guidance. However, it does not explicitly state when NOT to use this tool or mention alternatives like the 3D physics config tool, which limits the score.

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