Project Add Sound
project_add_soundAdds an MP3 or WAV sound file to a sprite in a Scratch project, copying it into the project's assets. Accepts only these formats to prevent project load errors.
Instructions
Add a sound to a sprite, copying the file into the project's assets/.
Scratch accepts only MP3 and WAV; other formats make the project refuse to load, with no warning.
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": {
"sprite": "<sprite>",
"file": "<file>"
},
"name": "project_add_sound"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Path to an .mp3 or .wav file. | |
| name | No | Sound name in Scratch. Defaults to the filename without its extension. | |
| path | No | Project to modify. Defaults to the active project. | |
| sprite | Yes | Sprite name, i.e. its .gs filename without the extension. The Stage is "stage". |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | ||
| name | Yes | ||
| path | Yes | ||
| exists | Yes |