@appscreenshotstudio/mcp 0.8.2 → 0.8.4
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 +26 -7
- 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
|
@@ -348,8 +348,15 @@ Costs 5 credits per generation.`,
|
|
|
348
348
|
hasScreens
|
|
349
349
|
? '1. Your attached screenshots were placed into the device frames (upload-screenshots can swap any card later)'
|
|
350
350
|
: '1. Use upload-screenshots to add your app screenshots into the device frames',
|
|
351
|
-
|
|
352
|
-
|
|
351
|
+
// edit-screenshots was missing from this list until 2026-09-14, and the
|
|
352
|
+
// omission has a measurable cost: with no in-band pointer to the refine
|
|
353
|
+
// path, the cheapest visible way to change a design is to call generate
|
|
354
|
+
// again, which bills 5 credits and starts a NEW project every time. User
|
|
355
|
+
// 5b0a496d called generate 4x and edit 0x on one brief, spending 20 of 25
|
|
356
|
+
// trial credits on four near-identical projects.
|
|
357
|
+
'2. Use edit-screenshots to refine THIS project (change copy, colours, layout). Prefer it over calling generate again: generate always starts a new project and re-bills.',
|
|
358
|
+
'3. Use render-screenshots to export final PNGs (needs a paid plan; trials can build and iterate but not export)',
|
|
359
|
+
'4. Or open the project URL in a browser to preview and adjust',
|
|
353
360
|
'',
|
|
354
361
|
imageErrors.length ? `Image read warnings:\n${imageErrors.join('\n')}` : '',
|
|
355
362
|
chatData.suggestions?.length
|
|
@@ -493,12 +500,18 @@ server.registerTool('render-screenshots', {
|
|
|
493
500
|
idempotentHint: true,
|
|
494
501
|
openWorldHint: false,
|
|
495
502
|
},
|
|
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).
|
|
503
|
+
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). Costs no credits, but export is unlocked by the first payment: on a trial this returns 402 PAYMENT_REQUIRED, so check the plan before promising a user their PNGs. 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
504
|
inputSchema: z.object({
|
|
498
505
|
project_id: z.string().describe('Project ID to render'),
|
|
506
|
+
device_ids: z
|
|
507
|
+
.array(z.string())
|
|
508
|
+
.min(1)
|
|
509
|
+
.max(4)
|
|
510
|
+
.optional()
|
|
511
|
+
.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
512
|
}),
|
|
500
|
-
}, async ({ project_id }) => {
|
|
501
|
-
const res = await apiCall('POST', `/api/v1/projects/${project_id}/render
|
|
513
|
+
}, async ({ project_id, device_ids }) => {
|
|
514
|
+
const res = await apiCall('POST', `/api/v1/projects/${project_id}/render`, device_ids?.length ? { device_ids } : undefined);
|
|
502
515
|
if (!res.ok) {
|
|
503
516
|
return {
|
|
504
517
|
content: [{ type: 'text', text: `Render failed: ${JSON.stringify(res.data)}` }],
|
|
@@ -506,14 +519,20 @@ server.registerTool('render-screenshots', {
|
|
|
506
519
|
}
|
|
507
520
|
const data = res.data.data;
|
|
508
521
|
const images = data.images || [];
|
|
522
|
+
// With more than one device in the response, "Card 1" appears once per set,
|
|
523
|
+
// so the device has to be on the line or the URLs cannot be told apart.
|
|
524
|
+
const deviceCount = new Set(images.map((img) => img.device_id).filter(Boolean)).size;
|
|
525
|
+
const label = (img, i) => deviceCount > 1 && img.device_id
|
|
526
|
+
? `${img.device_id} card ${(img.card_index ?? i) + 1}`
|
|
527
|
+
: `Card ${i + 1}`;
|
|
509
528
|
// Text block: full-resolution download URLs (for export / saving to disk).
|
|
510
529
|
const content = [
|
|
511
530
|
{
|
|
512
531
|
type: 'text',
|
|
513
532
|
text: [
|
|
514
|
-
`Rendered ${images.length} screenshot${images.length === 1 ? '' : 's'}:`,
|
|
533
|
+
`Rendered ${images.length} screenshot${images.length === 1 ? '' : 's'}${deviceCount > 1 ? ` across ${deviceCount} device sizes` : ''}:`,
|
|
515
534
|
'',
|
|
516
|
-
...images.map((img, i) =>
|
|
535
|
+
...images.map((img, i) => `${label(img, i)}: ${img.url} (${img.width}×${img.height})`),
|
|
517
536
|
'',
|
|
518
537
|
'Download URLs are valid for 7 days. Save the PNGs to disk now if you',
|
|
519
538
|
'need them long-term (re-rendering later is free).',
|
package/package.json
CHANGED