@appscreenshotstudio/mcp 0.8.1 → 0.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/dist/index.js +24 -6
- package/package.json +1 -1
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 AppScreenshotStudio
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 AppScreenshotStudio
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/index.js
CHANGED
|
@@ -32,6 +32,10 @@ const API_KEY = process.env.APPSCREENSHOTSTUDIO_API_KEY;
|
|
|
32
32
|
// mcp-server/skills/appscreenshotstudio/SKILL.md (ships in the npm package, so it drifts unseen),
|
|
33
33
|
// public/api-docs.md (served raw at /api-docs.md, linked from nowhere, so it drifts unseen too)
|
|
34
34
|
// Enforced by `npm run test:device-specs`, which reads all six files.
|
|
35
|
+
// Hand-copied from lib/device-specs.ts because this package ships standalone.
|
|
36
|
+
// `required` means required to PUBLISH, and it is emitted to agents as
|
|
37
|
+
// "required for store submission", so a wrong flag here is a wrong instruction
|
|
38
|
+
// rather than a cosmetic slip. Keep it in step with the source file.
|
|
35
39
|
const DEVICES = [
|
|
36
40
|
{ id: 'iphone-6.9', name: 'iPhone 16 Pro Max', width: 1260, height: 2736, category: 'iphone', required: true },
|
|
37
41
|
{ id: 'iphone-6.3', name: 'iPhone 17 Pro', width: 1206, height: 2622, category: 'iphone', required: false },
|
|
@@ -39,7 +43,9 @@ const DEVICES = [
|
|
|
39
43
|
{ id: 'android-phone', name: 'Android Phone', width: 1080, height: 2340, category: 'android-phone', required: true },
|
|
40
44
|
{ id: 'pixel-11-pro', name: 'Google Pixel 11 Pro', width: 1280, height: 2856, category: 'android-phone', required: false },
|
|
41
45
|
{ id: 'galaxy-s26-ultra', name: 'Samsung Galaxy S26 Ultra', width: 1440, height: 3120, category: 'android-phone', required: false },
|
|
42
|
-
|
|
46
|
+
// Play Console requires 2 screenshots to publish; tablets are "can add", not
|
|
47
|
+
// "must provide". Was `true` until 2026-09-07. See lib/device-specs.ts.
|
|
48
|
+
{ id: 'android-tablet-10', name: 'Android Tablet 7"', width: 1200, height: 1920, category: 'android-tablet', required: false },
|
|
43
49
|
{ id: 'android-tablet-large', name: 'Android Tablet 10"', width: 1600, height: 2560, category: 'android-tablet', required: false },
|
|
44
50
|
{ id: 'apple-watch-ultra', name: 'Apple Watch Ultra 2', width: 410, height: 502, category: 'apple-watch', required: true },
|
|
45
51
|
];
|
|
@@ -487,12 +493,18 @@ server.registerTool('render-screenshots', {
|
|
|
487
493
|
idempotentHint: true,
|
|
488
494
|
openWorldHint: false,
|
|
489
495
|
},
|
|
490
|
-
description: 'Export a screenshot project to high-resolution PNG files at exact App Store dimensions. Returns download URLs for each card; URLs stay valid for 7 days, so save the PNGs to disk promptly (re-rendering is free if a URL has expired). Free (no credit cost). Rendering blocks until the PNGs are ready: expect roughly 20-40s
|
|
496
|
+
description: 'Export a screenshot project to high-resolution PNG files at exact App Store dimensions. Returns download URLs for each card; URLs stay valid for 7 days, so save the PNGs to disk promptly (re-rendering is free if a URL has expired). Free (no credit cost). Pass device_ids to get the same canvas at several device sizes in one call, re-laid-out for each, instead of building a second project: an App Store submission wants the 6.9-inch iPhone and, when the app supports iPad, the 13-inch iPad, and Google Play is a separate listing. Rendering blocks until the PNGs are ready: expect roughly 20-40s per iPhone set and 60-120s per iPad set (the larger canvas renders slower), and those add up per device, so allow up to ~2 minutes each before treating it as failed. Note: device mockups will show empty frames unless app screenshots have been uploaded via upload-screenshots first.',
|
|
491
497
|
inputSchema: z.object({
|
|
492
498
|
project_id: z.string().describe('Project ID to render'),
|
|
499
|
+
device_ids: z
|
|
500
|
+
.array(z.string())
|
|
501
|
+
.min(1)
|
|
502
|
+
.max(4)
|
|
503
|
+
.optional()
|
|
504
|
+
.describe('Optional. Render the same canvas at these device sizes instead of the project device. Each id is a full render, so up to 4. Use list-devices for valid ids.'),
|
|
493
505
|
}),
|
|
494
|
-
}, async ({ project_id }) => {
|
|
495
|
-
const res = await apiCall('POST', `/api/v1/projects/${project_id}/render
|
|
506
|
+
}, async ({ project_id, device_ids }) => {
|
|
507
|
+
const res = await apiCall('POST', `/api/v1/projects/${project_id}/render`, device_ids?.length ? { device_ids } : undefined);
|
|
496
508
|
if (!res.ok) {
|
|
497
509
|
return {
|
|
498
510
|
content: [{ type: 'text', text: `Render failed: ${JSON.stringify(res.data)}` }],
|
|
@@ -500,14 +512,20 @@ server.registerTool('render-screenshots', {
|
|
|
500
512
|
}
|
|
501
513
|
const data = res.data.data;
|
|
502
514
|
const images = data.images || [];
|
|
515
|
+
// With more than one device in the response, "Card 1" appears once per set,
|
|
516
|
+
// so the device has to be on the line or the URLs cannot be told apart.
|
|
517
|
+
const deviceCount = new Set(images.map((img) => img.device_id).filter(Boolean)).size;
|
|
518
|
+
const label = (img, i) => deviceCount > 1 && img.device_id
|
|
519
|
+
? `${img.device_id} card ${(img.card_index ?? i) + 1}`
|
|
520
|
+
: `Card ${i + 1}`;
|
|
503
521
|
// Text block: full-resolution download URLs (for export / saving to disk).
|
|
504
522
|
const content = [
|
|
505
523
|
{
|
|
506
524
|
type: 'text',
|
|
507
525
|
text: [
|
|
508
|
-
`Rendered ${images.length} screenshot${images.length === 1 ? '' : 's'}:`,
|
|
526
|
+
`Rendered ${images.length} screenshot${images.length === 1 ? '' : 's'}${deviceCount > 1 ? ` across ${deviceCount} device sizes` : ''}:`,
|
|
509
527
|
'',
|
|
510
|
-
...images.map((img, i) =>
|
|
528
|
+
...images.map((img, i) => `${label(img, i)}: ${img.url} (${img.width}×${img.height})`),
|
|
511
529
|
'',
|
|
512
530
|
'Download URLs are valid for 7 days. Save the PNGs to disk now if you',
|
|
513
531
|
'need them long-term (re-rendering later is free).',
|
package/package.json
CHANGED