Skip to main content
Glama

cocos_set_bundle_config

Configure asset bundles in Cocos Creator by marking folders and setting properties like compression, priority, and remote loading for optimized game resource management.

Instructions

Mark a folder as an Asset Bundle by patching its .meta sidecar.

folder_rel_path: relative to project root, e.g. 'assets/levels/world1'. bundle_name: defaults to the folder's basename when None. priority: bundle load priority 1..N (higher = loaded first). compression_type: {platform: mode}. Common modes:

  • 'merge_dep' (default for most platforms)

  • 'subpackage' (WeChat — requires also calling cocos_set_wechat_subpackages with matching root)

  • 'zip' (compress entire bundle)

  • 'none' (no compression) Example: {"web-mobile": "merge_dep", "wechatgame": "subpackage"} is_remote: {platform: bool} to enable remote/CDN loading per platform.

At runtime, load via cc.assetManager.loadBundle('<bundle_name>').

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_pathYes
folder_rel_pathYes
bundle_nameNo
is_bundleNo
priorityNo
compression_typeNo
is_remoteNo
Behavior3/5

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

With no annotations provided, the description carries full burden. It adequately describes the core behavior (patching .meta files) and mentions runtime loading implications. However, it lacks details about side effects (e.g., whether this overwrites existing configs), error conditions, or permission requirements that would be helpful 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.

Conciseness4/5

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

The description is efficiently structured with parameter explanations followed by a runtime usage note. Every sentence adds value, though the compression_type explanation could be slightly more concise. It's appropriately sized for a complex configuration tool with many parameters.

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 (7 parameters, mutation operation, no annotations, no output schema), the description does well. It covers parameter semantics thoroughly and includes runtime context. The main gap is lack of explicit behavioral warnings or error handling information that would be valuable for a configuration mutation tool.

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?

With 0% schema description coverage for 7 parameters, the description provides excellent compensation. It explains all key parameters (folder_rel_path, bundle_name, priority, compression_type, is_remote) with examples, defaults, and platform-specific details. The description adds substantial meaning beyond the bare schema 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 specific action ('Mark a folder as an Asset Bundle by patching its .meta sidecar') and identifies the resource (folder with .meta file). It distinguishes from siblings by focusing on bundle configuration rather than asset creation or scene manipulation, making its purpose unambiguous.

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 about when to use this tool (configuring asset bundles for runtime loading) and includes a runtime usage example. However, it doesn't explicitly state when NOT to use it or name specific alternatives among the many sibling tools, though the context implies it's for bundle setup rather than general asset management.

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