Upload attached screenshot
upload_assetImport a screenshot or artwork attached to this ChatGPT conversation. Pass the attachment as file; ChatGPT supplies download_url and file_id. The server downloads, validates and stores the original image. No shell, local path, base64 or follow-up HTTP upload is needed. Use a unique key such as capture.1 for each image; uploading an existing key replaces it. The returned key is immediately usable by assign_asset_slot. PNG, JPEG and static SVG are supported. Requires assets:write for this project. Upload each of multiple attachments separately.
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": {
"projectId": "<projectId>",
"key": "<key>",
"file": "<file>"
},
"name": "upload_asset"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Stable asset key, e.g. capture.1. Use a different key for each attachment. | |
| file | Yes | User-attached file supplied by ChatGPT file params. Do not invent its URL or file ID. | |
| theme | No | ||
| locale | No | ||
| screen | No | ||
| projectId | Yes |