@appscreenshotstudio/mcp 0.8.2 → 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 +17 -5
- 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
|
@@ -493,12 +493,18 @@ server.registerTool('render-screenshots', {
|
|
|
493
493
|
idempotentHint: true,
|
|
494
494
|
openWorldHint: false,
|
|
495
495
|
},
|
|
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). 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.',
|
|
497
497
|
inputSchema: z.object({
|
|
498
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.'),
|
|
499
505
|
}),
|
|
500
|
-
}, async ({ project_id }) => {
|
|
501
|
-
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);
|
|
502
508
|
if (!res.ok) {
|
|
503
509
|
return {
|
|
504
510
|
content: [{ type: 'text', text: `Render failed: ${JSON.stringify(res.data)}` }],
|
|
@@ -506,14 +512,20 @@ server.registerTool('render-screenshots', {
|
|
|
506
512
|
}
|
|
507
513
|
const data = res.data.data;
|
|
508
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}`;
|
|
509
521
|
// Text block: full-resolution download URLs (for export / saving to disk).
|
|
510
522
|
const content = [
|
|
511
523
|
{
|
|
512
524
|
type: 'text',
|
|
513
525
|
text: [
|
|
514
|
-
`Rendered ${images.length} screenshot${images.length === 1 ? '' : 's'}:`,
|
|
526
|
+
`Rendered ${images.length} screenshot${images.length === 1 ? '' : 's'}${deviceCount > 1 ? ` across ${deviceCount} device sizes` : ''}:`,
|
|
515
527
|
'',
|
|
516
|
-
...images.map((img, i) =>
|
|
528
|
+
...images.map((img, i) => `${label(img, i)}: ${img.url} (${img.width}×${img.height})`),
|
|
517
529
|
'',
|
|
518
530
|
'Download URLs are valid for 7 days. Save the PNGs to disk now if you',
|
|
519
531
|
'need them long-term (re-rendering later is free).',
|
package/package.json
CHANGED