Skip to main content
Glama

cocos_set_wechat_subpackages

Configure WeChat mini-game subpackages to bypass the 4MB main package limit. Define asset bundles to ensure game uploads meet platform requirements.

Instructions

Configure WeChat mini-game subpackages.

Each entry must be {"name": "", "root": "assets/"}. Example: [{"name": "level1", "root": "assets/levels/world1"}, {"name": "audio", "root": "assets/audio"}]

WeChat hard-caps the main package at 4 MB; without subpackages any non-trivial game gets rejected at upload time.

Replaces the entire subpackages list (atomic). Pair with cocos_set_bundle_config on each root folder to actually mark them as bundles in the asset DB.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_pathYes
subpackagesYes
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 key traits: the atomic replacement behavior ('Replaces the entire subpackages list'), the critical consequence of upload rejection without subpackages, and the dependency on another tool ('Pair with cocos_set_bundle_config'). It lacks details on error handling or permissions, but covers essential operational context.

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 efficiently structured: it starts with the core purpose, provides format details and an example, explains the necessity (WeChat constraints), and ends with implementation notes. Every sentence adds value without redundancy, and it is appropriately sized for the tool's complexity.

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 no annotations, 0% schema coverage, and no output schema, the description does well to cover purpose, usage context, behavioral traits, and parameter details. It misses explicit error cases or return values, but for a configuration tool with clear constraints and dependencies, it provides sufficient context for effective use.

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

Parameters4/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 provides detailed semantics for 'subpackages': specifying the required format with name and root fields, giving an example, and explaining the root path convention ('assets/<dir>'). It does not explain 'project_path', leaving a gap, but the coverage for the complex array parameter is substantial, justifying a score above baseline.

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 tool's purpose with specific verbs ('Configure', 'Replaces') and resource ('WeChat mini-game subpackages'). It distinguishes from sibling tools by focusing on subpackage configuration, unlike other tools that handle assets, scripts, or scene elements. The example reinforces the specific functionality.

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 context for when to use this tool: to avoid WeChat's 4 MB main package limit and prevent upload rejection. It explicitly mentions pairing with 'cocos_set_bundle_config' for complete implementation. However, it does not specify when NOT to use it or list direct alternatives 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