@appscreenshotstudio/mcp 0.1.5 → 0.2.0

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.
Files changed (2) hide show
  1. package/dist/index.js +460 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -64,6 +64,36 @@ function buildDesignMessage(input) {
64
64
  if (input.story_flow && input.story_flow !== 'auto') {
65
65
  parts.push(`\nStory flow: ${input.story_flow} (${STORY_FLOW_DESCRIPTIONS[input.story_flow] || input.story_flow})`);
66
66
  }
67
+ if (input.codebase_context) {
68
+ const ctx = input.codebase_context;
69
+ parts.push('\n--- App Research Context (from codebase analysis) ---');
70
+ if (ctx.readme_summary)
71
+ parts.push(`App overview: ${ctx.readme_summary}`);
72
+ if (ctx.key_screens?.length) {
73
+ parts.push('Key screens in the app:');
74
+ for (const screen of ctx.key_screens)
75
+ parts.push(` - ${screen}`);
76
+ }
77
+ if (ctx.color_tokens && Object.keys(ctx.color_tokens).length) {
78
+ parts.push(`Theme colors from code: ${JSON.stringify(ctx.color_tokens)}`);
79
+ }
80
+ if (ctx.target_audience)
81
+ parts.push(`Target audience: ${ctx.target_audience}`);
82
+ if (ctx.app_category)
83
+ parts.push(`App category: ${ctx.app_category}`);
84
+ if (ctx.competitive_edge)
85
+ parts.push(`What makes it unique: ${ctx.competitive_edge}`);
86
+ if (ctx.app_store_description)
87
+ parts.push(`Existing store description: ${ctx.app_store_description}`);
88
+ if (ctx.tech_stack)
89
+ parts.push(`Tech stack: ${ctx.tech_stack}`);
90
+ if (ctx.ui_style)
91
+ parts.push(`UI style: ${ctx.ui_style}`);
92
+ if (ctx.primary_user_flow)
93
+ parts.push(`Primary user flow: ${ctx.primary_user_flow}`);
94
+ parts.push('--- End App Research Context ---');
95
+ parts.push('\nUse the research context above to create screenshots that accurately represent this specific app. Headlines, features, and visual style should reflect what the app actually does and looks like.');
96
+ }
67
97
  parts.push(`\nAll device mockups should have screenshotImage: null — the developer will upload actual app screenshots later.`);
68
98
  parts.push(`Please include projectMeta with brand colors, mood, appCategory, and a rich globalVisualTheme description.`);
69
99
  return parts.join('\n');
@@ -78,6 +108,8 @@ server.registerTool('generate-screenshots', {
78
108
  title: 'Generate App Store Screenshots',
79
109
  description: `Create a complete set of App Store screenshot designs for an app. Returns a project URL where the developer can upload actual app screenshots into the device frames and export final PNGs.
80
110
 
111
+ IMPORTANT: Before calling this tool, research the user's codebase to populate the codebase_context parameter. Search for: package.json/README (app name & description), theme/color config files (brand colors), route definitions (key screens), marketing copy (value proposition), and App Store metadata. The more context you provide, the better the screenshots will be. Call prepare-screenshot-brief first if you need a research checklist.
112
+
81
113
  Each card is a layered composition with: gradient background, decorative glow orbs, bold headline with colored accent words, device mockup (iPhone/iPad/Android with perspective tilts), and optional floating elements (badges, star ratings, UI snippets).
82
114
 
83
115
  Available layouts per card:
@@ -120,14 +152,41 @@ Costs 5 credits per generation.`,
120
152
  .describe('Number of screenshot cards to generate (3-10). Default: 5'),
121
153
  story_flow: z.enum(['auto', 'standard', 'problem-solution', 'social-proof', 'benefit-first', 'journey', 'hero-intro', 'social-proof-bookend']).default('auto')
122
154
  .describe('Narrative structure for the screenshots. "auto" lets the AI choose the best flow.'),
155
+ codebase_context: z.object({
156
+ readme_summary: z.string().optional()
157
+ .describe('Summary of the app from README or docs — what does it do and why?'),
158
+ key_screens: z.array(z.string()).max(15).optional()
159
+ .describe('Main screens/views in the app — e.g. "Dashboard with activity feed", "Settings with theme toggle"'),
160
+ color_tokens: z.record(z.string()).optional()
161
+ .describe('Brand/theme colors found in code — e.g. {"primary": "#7C3AED", "background": "#0F172A"}'),
162
+ target_audience: z.string().optional()
163
+ .describe('Who the app is for — e.g. "busy professionals who want to track habits"'),
164
+ app_category: z.string().optional()
165
+ .describe('App category — e.g. fitness, finance, social, productivity, food, travel, health, education'),
166
+ competitive_edge: z.string().optional()
167
+ .describe('What makes this app unique vs competitors'),
168
+ app_store_description: z.string().optional()
169
+ .describe('Existing App Store/Play Store description if found in the codebase'),
170
+ tech_stack: z.string().optional()
171
+ .describe('Tech stack — e.g. "React Native", "SwiftUI", "Flutter". Useful for developer-tool apps.'),
172
+ ui_style: z.string().optional()
173
+ .describe('UI style observations — e.g. "dark mode with neon accents", "clean minimal with lots of whitespace"'),
174
+ primary_user_flow: z.string().optional()
175
+ .describe('The main user journey — e.g. "Sign up → Create project → Invite team → Track progress"'),
176
+ }).optional()
177
+ .describe('Context gathered from researching the app codebase. Dramatically improves screenshot quality — the more detail here, the better the output.'),
123
178
  }),
124
179
  }, async (input) => {
125
- // Step 1: Create project
180
+ // Step 1: Create project (with codebase context if provided)
126
181
  const projectName = `${input.app_name} Screenshots`;
127
- const createRes = await apiCall('POST', '/api/v1/projects', {
182
+ const createBody = {
128
183
  device_id: input.device_id,
129
184
  name: projectName,
130
- });
185
+ };
186
+ if (input.codebase_context) {
187
+ createBody.codebase_context = input.codebase_context;
188
+ }
189
+ const createRes = await apiCall('POST', '/api/v1/projects', createBody);
131
190
  if (!createRes.ok) {
132
191
  return {
133
192
  content: [{ type: 'text', text: `Failed to create project: ${JSON.stringify(createRes.data)}` }],
@@ -208,10 +267,42 @@ Example edit messages:
208
267
  message: z.string().describe('What to change — use natural language'),
209
268
  card_indices: z.array(z.number()).optional()
210
269
  .describe('Target specific cards by index (0-based). e.g. [0] for card 1, [2,3] for cards 3-4. Omit to apply changes to all cards.'),
270
+ codebase_context: z.object({
271
+ readme_summary: z.string().optional(),
272
+ key_screens: z.array(z.string()).max(15).optional(),
273
+ color_tokens: z.record(z.string()).optional(),
274
+ target_audience: z.string().optional(),
275
+ app_category: z.string().optional(),
276
+ competitive_edge: z.string().optional(),
277
+ app_store_description: z.string().optional(),
278
+ tech_stack: z.string().optional(),
279
+ ui_style: z.string().optional(),
280
+ primary_user_flow: z.string().optional(),
281
+ }).optional()
282
+ .describe('App context from codebase research. Helps the AI make edits that match the actual app.'),
211
283
  }),
212
- }, async ({ project_id, message, card_indices }) => {
284
+ }, async ({ project_id, message, card_indices, codebase_context }) => {
285
+ let enrichedMessage = message;
286
+ if (codebase_context) {
287
+ const ctxParts = [];
288
+ if (codebase_context.readme_summary)
289
+ ctxParts.push(`App: ${codebase_context.readme_summary}`);
290
+ if (codebase_context.key_screens?.length)
291
+ ctxParts.push(`Screens: ${codebase_context.key_screens.join(', ')}`);
292
+ if (codebase_context.color_tokens)
293
+ ctxParts.push(`Colors: ${JSON.stringify(codebase_context.color_tokens)}`);
294
+ if (codebase_context.target_audience)
295
+ ctxParts.push(`Audience: ${codebase_context.target_audience}`);
296
+ if (codebase_context.ui_style)
297
+ ctxParts.push(`UI style: ${codebase_context.ui_style}`);
298
+ if (codebase_context.competitive_edge)
299
+ ctxParts.push(`Unique: ${codebase_context.competitive_edge}`);
300
+ if (ctxParts.length) {
301
+ enrichedMessage = `[App context: ${ctxParts.join('. ')}]\n\n${message}`;
302
+ }
303
+ }
213
304
  const res = await apiCall('POST', `/api/v1/projects/${project_id}/chat`, {
214
- message,
305
+ message: enrichedMessage,
215
306
  selected_card_indices: card_indices || [],
216
307
  });
217
308
  if (!res.ok) {
@@ -376,6 +467,370 @@ The generated image is cropped to exact device dimensions and set as the card's
376
467
  }],
377
468
  };
378
469
  });
470
+ // Tool 7: prepare-screenshot-brief
471
+ server.registerTool('prepare-screenshot-brief', {
472
+ title: 'Prepare Screenshot Brief',
473
+ description: `Get a research checklist and strategy guide to prepare for screenshot generation. Call this BEFORE generate-screenshots to know what to look for in the codebase. Free — no API call or credits needed.
474
+
475
+ Returns:
476
+ - A codebase research checklist (file patterns to search for each tech stack)
477
+ - Story flow recommendations by app category
478
+ - Tips for writing compelling screenshot headlines
479
+ - The codebase_context schema to fill in
480
+
481
+ This tool helps you gather the right information so generate-screenshots produces the best possible output on the first try.`,
482
+ inputSchema: z.object({
483
+ app_category: z.string().optional()
484
+ .describe('App category if known — e.g. fitness, finance, social, productivity, developer-tools'),
485
+ platform: z.enum(['ios', 'android', 'both']).default('ios')
486
+ .describe('Target platform'),
487
+ }),
488
+ }, async ({ app_category, platform }) => {
489
+ const checklist = [
490
+ '# Screenshot Brief — Research Checklist',
491
+ '',
492
+ 'Search the codebase for each of these before calling generate-screenshots.',
493
+ 'The more you find, the better the screenshots will be.',
494
+ '',
495
+ '## 1. App Identity (REQUIRED)',
496
+ '',
497
+ '**Find the app name and description:**',
498
+ '- package.json → "name", "description"',
499
+ '- README.md → first paragraph, badges, tagline',
500
+ '- pubspec.yaml → "name", "description" (Flutter)',
501
+ '- build.gradle / app/build.gradle → applicationId, versionName (Android)',
502
+ '- Info.plist / *.xcodeproj → CFBundleDisplayName (iOS native)',
503
+ '- Cargo.toml → "name", "description" (Rust)',
504
+ '- pyproject.toml / setup.py → name, description (Python)',
505
+ '',
506
+ '**Find the value proposition:**',
507
+ '- Landing page / marketing page components → hero headline, subheadline',
508
+ '- README.md → "Features" or "Why" section',
509
+ '- App Store metadata files (fastlane/metadata/) → description, keywords',
510
+ '',
511
+ '## 2. Features & Screens (REQUIRED)',
512
+ '',
513
+ '**Find the main screens:**',
514
+ '- Route definitions: look for Router, Navigator, routes.ts, app.tsx routing',
515
+ '- Page/screen directories: pages/, screens/, views/, app/ (Next.js)',
516
+ '- Navigation config: tabs, drawer items, bottom nav',
517
+ '',
518
+ '**Find key features:**',
519
+ '- README.md → feature list, bullet points',
520
+ '- Settings/preferences screen → feature toggles reveal capabilities',
521
+ '- Changelog/release notes → recent features',
522
+ '',
523
+ '## 3. Visual Identity (HIGHLY RECOMMENDED)',
524
+ '',
525
+ '**Find brand colors:**',
526
+ '- tailwind.config.* → theme.extend.colors',
527
+ '- theme.ts, colors.ts, tokens.ts → color definitions',
528
+ '- CSS variables: :root { --primary: ... }',
529
+ '- styles/globals.css, variables.css → custom properties',
530
+ '- SwiftUI: Color.accentColor, Asset catalog colors',
531
+ '- Flutter: ThemeData, ColorScheme',
532
+ '- Android: colors.xml, themes.xml',
533
+ '',
534
+ '**Find fonts:**',
535
+ '- Font imports in layout/root files',
536
+ '- Google Fonts imports, @font-face declarations',
537
+ '- Typography config in theme files',
538
+ '',
539
+ '**Observe UI style:**',
540
+ '- Dark mode / light mode support?',
541
+ '- Design system: shadcn/ui, Material, Cupertino, custom?',
542
+ '- Dense or spacious layout?',
543
+ '- Rounded or sharp corners?',
544
+ '',
545
+ '## 4. Market Context (NICE TO HAVE)',
546
+ '',
547
+ '- Target audience mentions in docs, README, marketing copy',
548
+ '- Competitor references in code comments or docs',
549
+ '- Analytics/tracking events → reveal most-used features',
550
+ '- Testimonials or reviews referenced in code',
551
+ '- Social proof data (user counts, ratings)',
552
+ '',
553
+ '## 5. User Flow (NICE TO HAVE)',
554
+ '',
555
+ '- Onboarding screens → what the app teaches users first',
556
+ '- Auth flow → sign up with email, social, magic link?',
557
+ '- Main navigation → what users do most',
558
+ '- Key interactions → what makes the app satisfying to use',
559
+ ];
560
+ // Story flow recommendations
561
+ const storyFlows = [
562
+ '',
563
+ '---',
564
+ '',
565
+ '# Story Flow Recommendations',
566
+ '',
567
+ ];
568
+ const categoryRecommendations = {
569
+ 'fitness': [
570
+ '**Fitness apps → `journey` or `benefit-first`**',
571
+ '- Lead with transformation: "Before → After" or "Track → Improve → Achieve"',
572
+ '- Highlight: workout tracking, progress charts, streaks, community challenges',
573
+ '- Mood: energetic or bold',
574
+ ],
575
+ 'finance': [
576
+ '**Finance apps → `benefit-first` or `problem-solution`**',
577
+ '- Lead with outcomes: "Save $X/month" or "See all accounts in one place"',
578
+ '- Highlight: dashboards, charts, budgets, alerts, security',
579
+ '- Mood: professional or calm',
580
+ ],
581
+ 'social': [
582
+ '**Social apps → `social-proof-bookend` or `hero-intro`**',
583
+ '- Lead with community: "Join 1M+ users" or show vibrant UI',
584
+ '- Highlight: feed, messaging, profiles, discovery, sharing',
585
+ '- Mood: playful or energetic',
586
+ ],
587
+ 'productivity': [
588
+ '**Productivity apps → `problem-solution` or `standard`**',
589
+ '- Lead with pain point: "Stop juggling 5 apps" → "One place for everything"',
590
+ '- Highlight: task management, collaboration, integrations, speed',
591
+ '- Mood: minimal or professional',
592
+ ],
593
+ 'food': [
594
+ '**Food/recipe apps → `hero-intro` or `journey`**',
595
+ '- Lead with beautiful imagery or the discovery experience',
596
+ '- Highlight: recipe browsing, meal planning, grocery lists, cooking mode',
597
+ '- Mood: warm or playful',
598
+ ],
599
+ 'travel': [
600
+ '**Travel apps → `journey` or `hero-intro`**',
601
+ '- Lead with destination discovery or trip planning flow',
602
+ '- Highlight: search, booking, itinerary, maps, offline access',
603
+ '- Mood: energetic or calm',
604
+ ],
605
+ 'health': [
606
+ '**Health/wellness apps → `benefit-first` or `journey`**',
607
+ '- Lead with outcomes: "Sleep better", "Feel calmer", "Know your body"',
608
+ '- Highlight: tracking, insights, reminders, progress, professional guidance',
609
+ '- Mood: calm or professional',
610
+ ],
611
+ 'education': [
612
+ '**Education apps → `journey` or `hero-intro`**',
613
+ '- Lead with learning progression or "learn anything" hero',
614
+ '- Highlight: courses, progress tracking, quizzes, certificates, offline',
615
+ '- Mood: playful or professional',
616
+ ],
617
+ 'developer-tools': [
618
+ '**Developer tools → `problem-solution` or `benefit-first`**',
619
+ '- Lead with workflow pain: "Stop copy-pasting" → "One command and done"',
620
+ '- Highlight: CLI, integrations, speed, DX, code examples',
621
+ '- Mood: minimal or bold',
622
+ ],
623
+ 'shopping': [
624
+ '**Shopping/e-commerce → `social-proof-bookend` or `benefit-first`**',
625
+ '- Lead with deals or trust: "Trusted by 500K+ shoppers"',
626
+ '- Highlight: discovery, search, wishlists, checkout, tracking',
627
+ '- Mood: bold or energetic',
628
+ ],
629
+ };
630
+ if (app_category && categoryRecommendations[app_category]) {
631
+ storyFlows.push(...categoryRecommendations[app_category]);
632
+ }
633
+ else {
634
+ storyFlows.push('**General recommendations by app type:**', '');
635
+ for (const [, lines] of Object.entries(categoryRecommendations)) {
636
+ storyFlows.push(...lines, '');
637
+ }
638
+ }
639
+ // Headline tips
640
+ const headlineTips = [
641
+ '',
642
+ '---',
643
+ '',
644
+ '# Screenshot Headline Tips',
645
+ '',
646
+ '- Lead with USER BENEFIT, not feature name: "Never forget a task" > "Task Management"',
647
+ '- Use power words: Track, Save, Build, Discover, Master, Simplify, Automate',
648
+ '- Include numbers when possible: "3x faster", "10K+ recipes", "Save 2hrs/week"',
649
+ '- First 3 screenshots matter most — App Store shows them in search results',
650
+ '- Hero card headline = your one-sentence pitch. Make it count.',
651
+ '- Keep headlines under 6 words. Subtitle can add detail.',
652
+ ];
653
+ // Device recommendations
654
+ const deviceTips = [
655
+ '',
656
+ '---',
657
+ '',
658
+ '# Device Recommendations',
659
+ '',
660
+ ];
661
+ if (platform === 'ios' || platform === 'both') {
662
+ deviceTips.push('**iOS (required for App Store):**');
663
+ deviceTips.push('- iPhone 16 Pro Max (iphone-6.9): 1260×2736 — REQUIRED');
664
+ deviceTips.push('- iPad Pro 13" (ipad-13): 2064×2752 — REQUIRED');
665
+ deviceTips.push('');
666
+ }
667
+ if (platform === 'android' || platform === 'both') {
668
+ deviceTips.push('**Android (required for Play Store):**');
669
+ deviceTips.push('- Android Phone (android-phone): 1080×2340 — REQUIRED');
670
+ deviceTips.push('- Android Tablet 10" (android-tablet-10): 2560×1600 — optional');
671
+ deviceTips.push('');
672
+ }
673
+ // Schema reminder
674
+ const schemaReminder = [
675
+ '',
676
+ '---',
677
+ '',
678
+ '# Next Step',
679
+ '',
680
+ 'After researching, call `generate-screenshots` with your findings in the `codebase_context` parameter:',
681
+ '```json',
682
+ '{',
683
+ ' "app_name": "...",',
684
+ ' "app_description": "...",',
685
+ ' "features": ["...", "..."],',
686
+ ' "brand_colors": { "primary": "#...", "secondary": "#..." },',
687
+ ' "mood": "...",',
688
+ ' "story_flow": "...",',
689
+ ' "count": 5,',
690
+ ' "codebase_context": {',
691
+ ' "readme_summary": "...",',
692
+ ' "key_screens": ["Dashboard", "Settings", "Profile", "..."],',
693
+ ' "color_tokens": { "primary": "#...", "background": "#..." },',
694
+ ' "target_audience": "...",',
695
+ ' "app_category": "...",',
696
+ ' "competitive_edge": "...",',
697
+ ' "ui_style": "...",',
698
+ ' "primary_user_flow": "Sign up → ... → ..."',
699
+ ' }',
700
+ '}',
701
+ '```',
702
+ ];
703
+ return {
704
+ content: [{
705
+ type: 'text',
706
+ text: [...checklist, ...storyFlows, ...headlineTips, ...deviceTips, ...schemaReminder].join('\n'),
707
+ }],
708
+ };
709
+ });
710
+ // ─── MCP Prompts ────────────────────────────────────────────────────────────────
711
+ // Prompt 1: Full workflow — research codebase → generate → iterate → export
712
+ server.registerPrompt('create-app-screenshots', {
713
+ title: 'Create App Store Screenshots',
714
+ description: 'Full guided workflow: research the codebase, generate screenshots, iterate, and export. Best results when used from within the app\'s project directory.',
715
+ argsSchema: {
716
+ platform: z.enum(['ios', 'android', 'both']).default('ios')
717
+ .describe('Target platform'),
718
+ extra_instructions: z.string().optional()
719
+ .describe('Any additional instructions — e.g. "use dark theme", "focus on the AI features", "make it seasonal for Christmas"'),
720
+ },
721
+ }, ({ platform, extra_instructions }) => ({
722
+ messages: [{
723
+ role: 'user',
724
+ content: {
725
+ type: 'text',
726
+ text: [
727
+ 'Create professional App Store screenshots for my app using AppScreenshotStudio.',
728
+ '',
729
+ 'Follow this workflow for the best results:',
730
+ '',
731
+ '## Step 1: Research My Codebase',
732
+ '',
733
+ 'Before generating anything, thoroughly research this codebase to understand what my app does.',
734
+ 'Call `prepare-screenshot-brief` to get a detailed research checklist, then search for:',
735
+ '',
736
+ '**App Identity:**',
737
+ '- package.json, pubspec.yaml, build.gradle, Info.plist → app name, version',
738
+ '- README.md → what the app does, value proposition, key features',
739
+ '- Marketing/landing pages → hero headline, positioning, taglines',
740
+ '',
741
+ '**Features & Screens:**',
742
+ '- Route/navigation definitions → list of screens the user sees',
743
+ '- Main views/pages/components → what to showcase in screenshots',
744
+ '- Settings/preferences → feature inventory',
745
+ '',
746
+ '**Visual Identity:**',
747
+ '- Theme/color config files → brand colors (tailwind.config, theme.ts, colors.xml, etc.)',
748
+ '- Font imports → typography choices',
749
+ '- Dark/light mode → UI aesthetic',
750
+ '',
751
+ '**Market Context:**',
752
+ '- App Store metadata (fastlane/metadata/, store listing files) → existing description',
753
+ '- README → target audience, competitor mentions',
754
+ '',
755
+ '## Step 2: Generate Screenshots',
756
+ '',
757
+ 'Use ALL your research to call `generate-screenshots` with rich parameters:',
758
+ '- Fill in `codebase_context` with everything you found',
759
+ '- Choose the best `story_flow` for this type of app',
760
+ '- Extract `brand_colors` from the theme files',
761
+ '- Write a compelling `app_description` based on the value proposition',
762
+ '- Order `features` by user impact',
763
+ `- Target platform: ${platform}${platform === 'both' ? ' (generate for iPhone first, then Android)' : ''}`,
764
+ `${platform === 'ios' || platform === 'both' ? '- Device: iphone-6.9 for iPhone, ipad-13 for iPad' : ''}`,
765
+ `${platform === 'android' || platform === 'both' ? '- Device: android-phone for Android' : ''}`,
766
+ '- Count: 5-6 cards recommended (App Store shows first 3 prominently in search)',
767
+ '',
768
+ '## Step 3: Review & Iterate',
769
+ '',
770
+ 'After generation, consider:',
771
+ '- Do the headlines accurately represent the app\'s value?',
772
+ '- Are the right features highlighted?',
773
+ '- Do the brand colors match the app?',
774
+ '- Would YOU download this app based on these screenshots?',
775
+ 'Use `edit-screenshots` to refine anything that doesn\'t feel right.',
776
+ '',
777
+ '## Step 4: Export',
778
+ '',
779
+ 'Use `render-screenshots` to get final high-resolution PNGs.',
780
+ 'Remind me to upload actual app screenshots into the device frames via the web app.',
781
+ '',
782
+ extra_instructions ? `## Additional Instructions\n\n${extra_instructions}\n` : '',
783
+ '---',
784
+ 'IMPORTANT: Take your time in Step 1. The quality of your research directly determines the quality of the screenshots. Thorough research saves multiple rounds of iteration.',
785
+ ].filter(Boolean).join('\n'),
786
+ },
787
+ }],
788
+ }));
789
+ // Prompt 2: Improve existing screenshots with codebase context
790
+ server.registerPrompt('improve-screenshots', {
791
+ title: 'Improve Existing Screenshots',
792
+ description: 'Research the codebase and improve an existing screenshot project. Use when screenshots have already been generated but need refinement.',
793
+ argsSchema: {
794
+ project_id: z.string().describe('Project ID to improve'),
795
+ focus: z.string().optional()
796
+ .describe('What to focus on — e.g. "headlines", "colors", "story flow", "add social proof"'),
797
+ },
798
+ }, ({ project_id, focus }) => ({
799
+ messages: [{
800
+ role: 'user',
801
+ content: {
802
+ type: 'text',
803
+ text: [
804
+ `I have an existing screenshot project (ID: ${project_id}) that I want to improve.`,
805
+ '',
806
+ '## Step 1: Inspect Current State',
807
+ '',
808
+ `Call \`get-project\` with project_id "${project_id}" to see the current screenshots.`,
809
+ 'Note the headlines, features shown, colors used, and story flow.',
810
+ '',
811
+ '## Step 2: Research My Codebase',
812
+ '',
813
+ 'Search the codebase to understand what my app actually does:',
814
+ '- Find the app name, description, and value proposition',
815
+ '- List the main features and screens',
816
+ '- Extract brand colors from theme/config files',
817
+ '- Understand the target audience',
818
+ '',
819
+ '## Step 3: Compare & Improve',
820
+ '',
821
+ 'Compare the current screenshots to what the app really is. Then use `edit-screenshots` to fix:',
822
+ '1. **Headline accuracy** — do they describe what the app actually does?',
823
+ '2. **Feature selection** — are the most valuable features highlighted?',
824
+ '3. **Brand consistency** — do colors match the app\'s theme?',
825
+ '4. **Story flow** — does the narrative make sense for this type of app?',
826
+ '5. **Visual polish** — enough decorative elements, good contrast, professional layout?',
827
+ '',
828
+ focus ? `## Focus Area\n\nPrioritize improving: ${focus}\n` : '',
829
+ 'Pass `codebase_context` with your research when calling `edit-screenshots` for context-aware changes.',
830
+ ].filter(Boolean).join('\n'),
831
+ },
832
+ }],
833
+ }));
379
834
  // ─── Start server ───────────────────────────────────────────────────────────────
380
835
  async function main() {
381
836
  if (!API_KEY) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appscreenshotstudio/mcp",
3
- "version": "0.1.5",
3
+ "version": "0.2.0",
4
4
  "description": "MCP server for generating App Store screenshots via AppScreenshotStudio",
5
5
  "type": "module",
6
6
  "license": "MIT",