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}.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"project_path": "<project_path>",
"src_path": "<src_path>"
},
"name": "cocos_add_resource_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_path | Yes | ||
| src_path | Yes | ||
| rel_path | No | ||
| uuid | No |