project_add_resource
Add images, fonts, or raw files to a Pebble project and register them for packaging. Supports base64 bitmaps and optional design-tier processing for target screens.
Instructions
Add a resource to a project and register it in package.json.
Copies source into <dir>/resources/ (created if missing) and
appends/updates a resources.media entry with the given name and
resource_type ("bitmap" | "font" | "raw"). For bitmaps,
source may also be base64 / a data: URI, and passing
prep_target (e.g. "emery", "menu-icon") routes the image
through the design tier -- resize/letterbox + palette quantize -- before
writing it. Returns the updated media list and the written file.
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": {
"dir": "<dir>",
"source": "<source>",
"name": "<name>"
},
"name": "project_add_resource"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dir | Yes | ||
| name | Yes | ||
| source | Yes | ||
| prep_target | No | ||
| resource_type | No | bitmap |