Skip to main content
Glama

cocos_set_engine_module

Enable or disable engine modules like physics-2d-box2d, spine, or dragon-bones in Cocos Creator projects. Configure required modules before using related components and rebuild after changes.

Instructions

Enable/disable an engine module (physics-2d-box2d, spine, dragon-bones, tiled-map, etc.).

IMPORTANT: You MUST enable 'physics-2d-box2d' before using RigidBody2D/Collider2D, 'spine' before using sp.Skeleton, 'dragon-bones' before DragonBones, 'tiled-map' before TiledMap. After changing modules, clean library+temp and rebuild.

Common modules: physics-2d-box2d, physics-2d-builtin, spine, dragon-bones, tiled-map, particle-2d, audio, animation, 2d, ui, graphics, mask, rich-text, tween, video, webview.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_pathYes
module_nameYes
enabledYes
Behavior4/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 effectively describes the tool's behavior: it enables or disables modules, requires post-action cleanup ('clean library+temp and rebuild'), and has dependencies (e.g., enabling modules before using specific components). However, it lacks details on error handling, permissions, or rate limits, which prevents a perfect score.

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 sized and front-loaded, starting with the core purpose. Every sentence adds value, such as prerequisites and cleanup steps. However, the list of common modules is lengthy but necessary for clarity, slightly reducing conciseness. Overall, it avoids waste and is well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (module configuration with dependencies), no annotations, and no output schema, the description is largely complete. It covers purpose, usage, parameters, and behavioral steps. A minor gap is the lack of output details (e.g., success/failure response), but this is mitigated by the tool's straightforward nature. It adequately supports agent invocation.

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?

The input schema has 0% description coverage, so the description must compensate. It adds significant meaning: 'project_path' is implied by context (Cocos project), 'module_name' is explained with examples like 'physics-2d-box2d' and a list of common modules, and 'enabled' is clarified as 'Enable/disable'. This fully documents the parameters beyond the schema's basic titles.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Enable/disable' and the resource 'engine module', with specific examples like 'physics-2d-box2d, spine, dragon-bones, tiled-map, etc.' It distinguishes this tool from siblings by focusing on module configuration rather than adding components or assets, as seen in tools like 'cocos_add_spine' or 'cocos_add_tiled_map'.

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

Usage Guidelines5/5

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

The description provides explicit usage guidelines, including when to use (e.g., 'MUST enable 'physics-2d-box2d' before using RigidBody2D/Collider2D') and post-action steps ('After changing modules, clean library+temp and rebuild'). It lists common modules, helping users select appropriate ones without specifying alternatives since this is a unique configuration tool among siblings.

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