apple_upload_screenshot
Upload screenshots to Apple App Store Connect by reserving slots and transferring image files for app publishing workflows.
Instructions
Upload a screenshot (reserves slot, then uploads binary)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| screenshotSetId | Yes | Screenshot Set ID | |
| filePath | Yes | Local path to the screenshot image | |
| fileName | Yes | File name (e.g. screen1.png) | |
| fileSize | Yes | File size in bytes |
Implementation Reference
- src/apple/tools.ts:305-358 (handler)Handler implementation for apple_upload_screenshot tool. It reserves the screenshot slot, uploads the file binary, and then commits the upload.
const uploadScreenshot: ToolDef = { name: 'apple_upload_screenshot', description: 'Upload a screenshot (reserves slot, then uploads binary)', schema: z.object({ screenshotSetId: z.string().describe('Screenshot Set ID'), filePath: z.string().describe('Local path to the screenshot image'), fileName: z.string().describe('File name (e.g. screen1.png)'), fileSize: z.number().describe('File size in bytes'), }), handler: async (client, args) => { // Step 1: Reserve screenshot const reservation = await client.request('/appScreenshots', { method: 'POST', body: { data: { type: 'appScreenshots', attributes: { fileName: args.fileName, fileSize: args.fileSize, }, relationships: { appScreenshotSet: { data: { type: 'appScreenshotSets', id: args.screenshotSetId }, }, }, }, }, }); // Step 2: Upload binary to each upload operation URL const screenshot = reservation.data; const operations = screenshot.attributes.uploadOperations; for (const op of operations) { await client.upload(op.url, args.filePath, 'image/png'); } // Step 3: Commit await client.request(`/appScreenshots/${screenshot.id}`, { method: 'PATCH', body: { data: { type: 'appScreenshots', id: screenshot.id, attributes: { uploaded: true, sourceFileChecksum: screenshot.attributes.sourceFileChecksum, }, }, }, }); return { success: true, screenshotId: screenshot.id }; }, - src/apple/tools.ts:308-313 (schema)Input schema for apple_upload_screenshot.
schema: z.object({ screenshotSetId: z.string().describe('Screenshot Set ID'), filePath: z.string().describe('Local path to the screenshot image'), fileName: z.string().describe('File name (e.g. screen1.png)'), fileSize: z.number().describe('File size in bytes'), }), - src/apple/tools.ts:1224-1224 (registration)Tool registration for apple_upload_screenshot in the appleTools array.
listScreenshotSets, createScreenshotSet, uploadScreenshot, deleteScreenshot,