Skip to main content
Glama

cocos_add_resource_file

Add custom resource files to Cocos Creator projects by copying files into assets/resources/ and generating required metadata for JSON, text assets, or other resources.

Instructions

Copy any file into assets/resources/ + write a minimal meta.

Suitable for JSON data, text assets, or custom resources. Returns {path, rel_path, uuid}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_pathYes
src_pathYes
rel_pathNo
uuidNo
Behavior2/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 mentions copying files and writing metadata, which implies a write operation, but doesn't disclose critical behavioral traits like whether it overwrites existing files, requires specific permissions, handles errors, or has side effects. The return format is noted, but other operational details are missing.

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 concise with three short sentences that are front-loaded: the first states the core action, the second provides usage context, and the third specifies the return value. There's minimal waste, though it could be slightly more structured for better readability.

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 (file copying with metadata writing), 4 parameters with 0% schema coverage, no annotations, and no output schema, the description is incomplete. It lacks details on parameters, behavioral constraints, error handling, and doesn't fully compensate for the missing structured data, leaving significant gaps for an AI agent.

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?

Schema description coverage is 0%, so the schema provides no parameter details. The description doesn't explain any of the 4 parameters (project_path, src_path, rel_path, uuid), such as what they represent, their formats, or how they interact. It mentions 'rel_path' and 'uuid' in the return value but not as inputs, adding confusion rather than clarity.

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: 'Copy any file into assets/resources/ + write a minimal meta.' This specifies the verb ('copy'), resource ('file'), and destination ('assets/resources/'), and mentions writing metadata. However, it doesn't explicitly differentiate from sibling tools like 'cocos_add_audio_file' or 'cocos_add_image', which might also add files to resources.

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

Usage Guidelines3/5

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

The description provides some usage context: 'Suitable for JSON data, text assets, or custom resources.' This implies when to use it (for those file types) but doesn't explicitly state when not to use it or name alternatives among the many sibling tools. It offers basic guidance but lacks explicit exclusions or comparisons.

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