shipshots-mcp 0.1.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 (59) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +109 -0
  3. package/dist/api-client.d.ts +19 -0
  4. package/dist/api-client.d.ts.map +1 -0
  5. package/dist/api-client.js +126 -0
  6. package/dist/api-client.js.map +1 -0
  7. package/dist/cli.d.ts +2 -0
  8. package/dist/cli.d.ts.map +1 -0
  9. package/dist/cli.js +128 -0
  10. package/dist/cli.js.map +1 -0
  11. package/dist/defaults.d.ts +86 -0
  12. package/dist/defaults.d.ts.map +1 -0
  13. package/dist/defaults.js +360 -0
  14. package/dist/defaults.js.map +1 -0
  15. package/dist/design.d.ts +26 -0
  16. package/dist/design.d.ts.map +1 -0
  17. package/dist/design.js +63 -0
  18. package/dist/design.js.map +1 -0
  19. package/dist/helpers.d.ts +12 -0
  20. package/dist/helpers.d.ts.map +1 -0
  21. package/dist/helpers.js +22 -0
  22. package/dist/helpers.js.map +1 -0
  23. package/dist/index.d.ts +3 -0
  24. package/dist/index.d.ts.map +1 -0
  25. package/dist/index.js +44 -0
  26. package/dist/index.js.map +1 -0
  27. package/dist/tools/batch.d.ts +4 -0
  28. package/dist/tools/batch.d.ts.map +1 -0
  29. package/dist/tools/batch.js +253 -0
  30. package/dist/tools/batch.js.map +1 -0
  31. package/dist/tools/duplicate.d.ts +4 -0
  32. package/dist/tools/duplicate.d.ts.map +1 -0
  33. package/dist/tools/duplicate.js +91 -0
  34. package/dist/tools/duplicate.js.map +1 -0
  35. package/dist/tools/export.d.ts +4 -0
  36. package/dist/tools/export.d.ts.map +1 -0
  37. package/dist/tools/export.js +67 -0
  38. package/dist/tools/export.js.map +1 -0
  39. package/dist/tools/layers.d.ts +4 -0
  40. package/dist/tools/layers.d.ts.map +1 -0
  41. package/dist/tools/layers.js +493 -0
  42. package/dist/tools/layers.js.map +1 -0
  43. package/dist/tools/project.d.ts +4 -0
  44. package/dist/tools/project.d.ts.map +1 -0
  45. package/dist/tools/project.js +190 -0
  46. package/dist/tools/project.js.map +1 -0
  47. package/dist/tools/screen.d.ts +4 -0
  48. package/dist/tools/screen.d.ts.map +1 -0
  49. package/dist/tools/screen.js +295 -0
  50. package/dist/tools/screen.js.map +1 -0
  51. package/dist/tools/video.d.ts +4 -0
  52. package/dist/tools/video.d.ts.map +1 -0
  53. package/dist/tools/video.js +144 -0
  54. package/dist/tools/video.js.map +1 -0
  55. package/dist/types.d.ts +163 -0
  56. package/dist/types.d.ts.map +1 -0
  57. package/dist/types.js +4 -0
  58. package/dist/types.js.map +1 -0
  59. package/package.json +41 -0
@@ -0,0 +1,190 @@
1
+ import { z } from "zod";
2
+ import { CANVAS_WIDTH, CANVAS_HEIGHT } from "../defaults.js";
3
+ import { FONTS, PALETTES, GRADIENTS } from "../design.js";
4
+ const TEMPLATE_PRESETS = [
5
+ {
6
+ id: "centered",
7
+ name: "Centered",
8
+ description: "Bold headline above a centered iPhone device frame. Clean, symmetric layout.",
9
+ category: "iphone",
10
+ layout: "centered",
11
+ colors: { bg: "#6366f1", gradient: "#4f46e5" },
12
+ typography: { headline: "96px weight 900", subtitle: "40px weight 400" },
13
+ },
14
+ {
15
+ id: "side-by-side",
16
+ name: "Side by Side",
17
+ description: "Text on the left, device on the right (iPhone). Diagonal composition with rotated device.",
18
+ category: "iphone",
19
+ layout: "diagonal",
20
+ colors: { bg: "#059669", gradient: "#065f46" },
21
+ typography: { headline: "92px weight 800", subtitle: "40px weight 400" },
22
+ },
23
+ {
24
+ id: "feature-callout",
25
+ name: "Feature Callout",
26
+ description: "Accent badge + headline above device. Good for highlighting a specific feature.",
27
+ category: "iphone",
28
+ layout: "centered",
29
+ colors: { bg: "#0ea5e9", gradient: "#0369a1" },
30
+ typography: { headline: "88px weight 800", subtitle: "36px weight 400", badge: "22px weight 700" },
31
+ },
32
+ {
33
+ id: "android-centered",
34
+ name: "Android Centered",
35
+ description: "Centered text above an Android device frame. Same as 'centered' but with Android device.",
36
+ category: "android",
37
+ layout: "centered",
38
+ colors: { bg: "#8b5cf6", gradient: "#6d28d9" },
39
+ typography: { headline: "96px weight 900", subtitle: "40px weight 400" },
40
+ },
41
+ {
42
+ id: "android-side",
43
+ name: "Android Side",
44
+ description: "Dark monochrome layout with left-aligned text and Android device on the right.",
45
+ category: "android",
46
+ layout: "diagonal",
47
+ colors: { bg: "#18181b", gradient: "#27272a" },
48
+ typography: { headline: "88px weight 800", subtitle: "36px weight 400" },
49
+ },
50
+ {
51
+ id: "hero-text",
52
+ name: "Hero Text",
53
+ description: "Bold text-only title card, no device frame. Great as the first or last screen.",
54
+ category: "text-only",
55
+ layout: "text-only",
56
+ colors: { bg: "#f97316", gradient: "#ea580c" },
57
+ typography: { headline: "120px weight 900", subtitle: "36px weight 400" },
58
+ },
59
+ {
60
+ id: "blank",
61
+ name: "Blank Canvas",
62
+ description: "Start from scratch with an empty canvas. Build your own layout.",
63
+ category: "basic",
64
+ layout: "empty",
65
+ colors: { bg: "#6366f1" },
66
+ },
67
+ ];
68
+ export function registerProjectTools(server, api) {
69
+ server.tool("create_project", `Create a new Shipshots project. Canvas is ${CANVAS_WIDTH}x${CANVAS_HEIGHT} (iPhone 6.9").
70
+
71
+ DESIGN TIP: Use list_palettes/list_gradients for colors and list_fonts for typography. Each screen should have a gradient background, headline (80-120px bold), subtitle (32-44px, 75% opacity), and a device frame with screenshot.`, {
72
+ name: z.string().describe("Project name"),
73
+ template: z
74
+ .string()
75
+ .optional()
76
+ .describe("Template preset ID (e.g. 'centered', 'side-by-side', 'android-centered'). Use list_templates to see options."),
77
+ }, async ({ name, template }) => {
78
+ const result = await api.createProject(name, undefined, template);
79
+ return {
80
+ content: [
81
+ {
82
+ type: "text",
83
+ text: JSON.stringify({
84
+ projectId: result.id,
85
+ url: api.getProjectUrl(result.id),
86
+ message: `Project "${name}" created successfully.${template ? ` Template "${template}" applied.` : ""} Open the URL to view and edit it.`,
87
+ }, null, 2),
88
+ },
89
+ ],
90
+ };
91
+ });
92
+ server.tool("get_project", `Fetch the full project data including all screens and layers. Use this to inspect a project before making changes.`, {
93
+ project_id: z.string().describe("The project ID to fetch"),
94
+ }, async ({ project_id }) => {
95
+ const project = await api.getProject(project_id);
96
+ return {
97
+ content: [
98
+ {
99
+ type: "text",
100
+ text: JSON.stringify(project, null, 2),
101
+ },
102
+ ],
103
+ };
104
+ });
105
+ server.tool("delete_project", `Permanently delete a project and all its screens, layers, and uploaded images.`, {
106
+ project_id: z.string().describe("The project ID to delete"),
107
+ }, async ({ project_id }) => {
108
+ await api.deleteProject(project_id);
109
+ return {
110
+ content: [
111
+ {
112
+ type: "text",
113
+ text: JSON.stringify({ message: `Project "${project_id}" deleted.` }, null, 2),
114
+ },
115
+ ],
116
+ };
117
+ });
118
+ server.tool("list_templates", `List all available template presets for Shipshots projects.
119
+
120
+ Templates are starting points that pre-populate screens with text, device frames, and layouts. Each template generates 5 screens with different content variations.
121
+
122
+ Categories:
123
+ - iphone: Templates featuring iPhone device frames
124
+ - android: Templates featuring Android device frames
125
+ - text-only: Text-focused layouts without device frames
126
+ - basic: Blank canvas or minimal starting points
127
+
128
+ Each template includes its default colors and typography sizes. Use the template ID with create_project to start from a template.`, {}, async () => {
129
+ return {
130
+ content: [
131
+ {
132
+ type: "text",
133
+ text: JSON.stringify(TEMPLATE_PRESETS, null, 2),
134
+ },
135
+ ],
136
+ };
137
+ });
138
+ // ── Design resource tools ──
139
+ server.tool("list_fonts", `List available fonts for text layers, grouped by category with usage recommendations.
140
+
141
+ Categories:
142
+ - sans-serif: Clean, modern fonts. Best for most app screenshots.
143
+ - serif: Elegant, editorial. Premium/luxury apps.
144
+ - display: Bold, attention-grabbing. Headlines only.
145
+ - mono: Code, developer tools.
146
+
147
+ PAIRING TIP: Use the same font family for headlines and subtitles, but vary the weight (e.g., Inter 800 for headlines, Inter 400 for subtitles). This creates hierarchy without visual clutter.`, {}, async () => {
148
+ return {
149
+ content: [
150
+ {
151
+ type: "text",
152
+ text: JSON.stringify(FONTS, null, 2),
153
+ },
154
+ ],
155
+ };
156
+ });
157
+ server.tool("list_palettes", `List color palettes with recommended text colors and usage vibes.
158
+
159
+ Each palette has 3 colors (primary, secondary, accent) plus a recommended text color for readability. The "vibe" suggests what kind of app each palette suits.
160
+
161
+ USE WITH SCREENS: Set the primary color as backgroundColor and secondary as gradientColor2 with backgroundType="gradient". Use the textColor for all text layers on that screen.
162
+
163
+ VARIETY TIP: Use different palettes for different screens to create visual variety, or use the same palette with different gradient directions.`, {}, async () => {
164
+ return {
165
+ content: [
166
+ {
167
+ type: "text",
168
+ text: JSON.stringify(PALETTES, null, 2),
169
+ },
170
+ ],
171
+ };
172
+ });
173
+ server.tool("list_gradients", `List gradient presets with colors, direction, and usage vibes.
174
+
175
+ Each gradient has a "from" and "to" color plus a direction in degrees.
176
+
177
+ USE WITH SCREENS: Apply via update_screen with backgroundType="gradient", backgroundColor=from, gradientColor2=to, gradientDirection=direction.
178
+
179
+ VARIETY TIP: Use different gradients for each screen in a project. Vary the direction (135°, 160°, 180°) across screens for visual rhythm.`, {}, async () => {
180
+ return {
181
+ content: [
182
+ {
183
+ type: "text",
184
+ text: JSON.stringify(GRADIENTS, null, 2),
185
+ },
186
+ ],
187
+ };
188
+ });
189
+ }
190
+ //# sourceMappingURL=project.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/tools/project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE1D,MAAM,gBAAgB,GAAG;IACvB;QACE,EAAE,EAAE,UAAU;QACd,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,8EAA8E;QAC3F,QAAQ,EAAE,QAAQ;QAClB,MA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F,KAAK,IAAI,EAAE;QACT,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,gBAAgB,EAAE,IAAI,EAAE,CAAC,CAAC;iBAChD;aACF;SACF,CAAC;IACJ,CAAC,CACF,CAAC;IAEF,8BAA8B;IAE9B,MAAM,CAAC,IAAI,CACT,YAAY,EACZ;;;;;;;;gMAQ4L,EAC5L,EAAE,EACF,KAAK,IAAI,EAAE;QACT,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;iBACrC;aACF;SACF,CAAC;IACJ,CAAC,CACF,CAAC;IAEF,MAAM,CAAC,IAAI,CACT,eAAe,EACf;;;;;;gJAM4I,EAC5I,EAAE,EACF,KAAK,IAAI,EAAE;QACT,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;iBACxC;aACF;SACF,CAAC;IACJ,CAAC,CACF,CAAC;IAEF,MAAM,CAAC,IAAI,CACT,gBAAgB,EAChB;;;;;;2IAMuI,EACvI,EAAE,EACF,KAAK,IAAI,EAAE;QACT,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;iBACzC;aACF;SACF,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import type { ApiClient } from "../api-client.js";
3
+ export declare function registerScreenTools(server: McpServer, api: ApiClient): void;
4
+ //# sourceMappingURL=screen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"screen.d.ts","sourceRoot":"","sources":["../../src/tools/screen.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAKlD,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,GAAG,IAAI,CAsX3E"}
@@ -0,0 +1,295 @@
1
+ import { z } from "zod";
2
+ import { CANVAS_WIDTH, CANVAS_HEIGHT, generateId } from "../defaults.js";
3
+ import { computeScreenPositions } from "../helpers.js";
4
+ export function registerScreenTools(server, api) {
5
+ server.tool("add_screen", `Add a new screen (${CANVAS_WIDTH}x${CANVAS_HEIGHT} by default). Screens are positioned side-by-side automatically.
6
+
7
+ TIP: Use connect_screens to create panoramic strips where layers span across screen boundaries.`, {
8
+ project_id: z.string().describe("Project ID"),
9
+ name: z
10
+ .string()
11
+ .optional()
12
+ .describe('Screen name (default: "Screen N")'),
13
+ backgroundColor: z
14
+ .string()
15
+ .optional()
16
+ .describe('Background hex color (default: "#6366f1")'),
17
+ backgroundType: z
18
+ .enum(["solid", "gradient"])
19
+ .optional()
20
+ .describe('Background type (default: "solid")'),
21
+ gradientColor2: z
22
+ .string()
23
+ .optional()
24
+ .describe('Second gradient color (default: "#4f46e5")'),
25
+ gradientDirection: z
26
+ .number()
27
+ .optional()
28
+ .describe("Gradient direction in degrees (default: 135)"),
29
+ width: z
30
+ .number()
31
+ .optional()
32
+ .describe(`Canvas width in pixels (default: ${CANVAS_WIDTH})`),
33
+ height: z
34
+ .number()
35
+ .optional()
36
+ .describe(`Canvas height in pixels (default: ${CANVAS_HEIGHT})`),
37
+ backgroundImageUrl: z
38
+ .string()
39
+ .optional()
40
+ .describe("URL for background image layered on top of color/gradient"),
41
+ backgroundImageSize: z
42
+ .enum(["cover", "contain", "fill"])
43
+ .optional()
44
+ .describe('How the image fits (default: "cover")'),
45
+ backgroundImageOpacity: z
46
+ .number()
47
+ .min(0)
48
+ .max(1)
49
+ .optional()
50
+ .describe("Image opacity from 0 to 1 (default: 1)"),
51
+ }, async ({ project_id, name, backgroundColor, backgroundType, gradientColor2, gradientDirection, width, height, backgroundImageUrl, backgroundImageSize, backgroundImageOpacity, }) => {
52
+ const project = await api.getProject(project_id);
53
+ const screenName = name ?? `Screen ${project.screens.length + 1}`;
54
+ const newScreen = {
55
+ id: generateId(),
56
+ name: screenName,
57
+ layers: [],
58
+ backgroundColor: backgroundColor ?? "#6366f1",
59
+ backgroundType: backgroundType ?? "solid",
60
+ gradientColor2: gradientColor2 ?? "#4f46e5",
61
+ gradientDirection: gradientDirection ?? 135,
62
+ ...(backgroundImageUrl !== undefined && { backgroundImageUrl }),
63
+ ...(backgroundImageSize !== undefined && { backgroundImageSize }),
64
+ ...(backgroundImageOpacity !== undefined && { backgroundImageOpacity }),
65
+ width: width ?? CANVAS_WIDTH,
66
+ height: height ?? CANVAS_HEIGHT,
67
+ canvasX: 0,
68
+ canvasY: 0,
69
+ };
70
+ project.screens.push(newScreen);
71
+ project.screens = computeScreenPositions(project.screens);
72
+ await api.updateProject(project_id, {
73
+ ...project,
74
+ screens: project.screens,
75
+ updatedAt: new Date().toISOString(),
76
+ });
77
+ return {
78
+ content: [
79
+ {
80
+ type: "text",
81
+ text: JSON.stringify({
82
+ screenId: newScreen.id,
83
+ name: screenName,
84
+ message: `Screen "${screenName}" added to project.`,
85
+ totalScreens: project.screens.length,
86
+ }, null, 2),
87
+ },
88
+ ],
89
+ };
90
+ });
91
+ server.tool("update_screen", `Update screen properties like background color, name, dimensions, or per-screen animation overrides.
92
+
93
+ NOTE: Connected screens always use "slide-left" transition regardless of transitionType override. Set transition/duration to null to reset to project default.`, {
94
+ project_id: z.string().describe("Project ID"),
95
+ screen_id: z.string().describe("Screen ID to update"),
96
+ name: z.string().optional().describe("New screen name"),
97
+ backgroundColor: z
98
+ .string()
99
+ .optional()
100
+ .describe("New background hex color"),
101
+ backgroundType: z
102
+ .enum(["solid", "gradient"])
103
+ .optional()
104
+ .describe("Background type"),
105
+ gradientColor2: z
106
+ .string()
107
+ .optional()
108
+ .describe("Second gradient color"),
109
+ gradientDirection: z
110
+ .number()
111
+ .optional()
112
+ .describe("Gradient direction in degrees"),
113
+ width: z.number().optional().describe("Canvas width in pixels"),
114
+ height: z.number().optional().describe("Canvas height in pixels"),
115
+ backgroundImageUrl: z
116
+ .string()
117
+ .optional()
118
+ .describe("URL for background image (empty string to clear)"),
119
+ backgroundImageSize: z
120
+ .enum(["cover", "contain", "fill"])
121
+ .optional()
122
+ .describe('How the image fits (default: "cover")'),
123
+ backgroundImageOpacity: z
124
+ .number()
125
+ .min(0)
126
+ .max(1)
127
+ .optional()
128
+ .describe("Image opacity from 0 to 1 (default: 1)"),
129
+ transitionType: z
130
+ .string()
131
+ .nullable()
132
+ .optional()
133
+ .describe('Override entrance transition: "crossfade", "slide-left", "zoom-in", or null to reset'),
134
+ transitionDuration: z
135
+ .number()
136
+ .nullable()
137
+ .optional()
138
+ .describe("Override transition duration in frames, or null to reset to default"),
139
+ screenDuration: z
140
+ .number()
141
+ .nullable()
142
+ .optional()
143
+ .describe("Override screen duration in frames, or null to reset to default"),
144
+ }, async ({ project_id, screen_id, name, backgroundColor, backgroundType, gradientColor2, gradientDirection, width, height, backgroundImageUrl, backgroundImageSize, backgroundImageOpacity, transitionType, transitionDuration, screenDuration, }) => {
145
+ const project = await api.getProject(project_id);
146
+ const screenIndex = project.screens.findIndex((s) => s.id === screen_id);
147
+ if (screenIndex === -1) {
148
+ return {
149
+ content: [
150
+ {
151
+ type: "text",
152
+ text: `Error: Screen "${screen_id}" not found in project.`,
153
+ },
154
+ ],
155
+ isError: true,
156
+ };
157
+ }
158
+ const screen = project.screens[screenIndex];
159
+ if (name !== undefined)
160
+ screen.name = name;
161
+ if (backgroundColor !== undefined)
162
+ screen.backgroundColor = backgroundColor;
163
+ if (backgroundType !== undefined)
164
+ screen.backgroundType = backgroundType;
165
+ if (gradientColor2 !== undefined)
166
+ screen.gradientColor2 = gradientColor2;
167
+ if (gradientDirection !== undefined)
168
+ screen.gradientDirection = gradientDirection;
169
+ if (width !== undefined)
170
+ screen.width = width;
171
+ if (height !== undefined)
172
+ screen.height = height;
173
+ if (backgroundImageUrl !== undefined)
174
+ screen.backgroundImageUrl = backgroundImageUrl;
175
+ if (backgroundImageSize !== undefined)
176
+ screen.backgroundImageSize = backgroundImageSize;
177
+ if (backgroundImageOpacity !== undefined)
178
+ screen.backgroundImageOpacity = backgroundImageOpacity;
179
+ if (transitionType !== undefined)
180
+ screen.transitionType = transitionType ?? undefined;
181
+ if (transitionDuration !== undefined)
182
+ screen.transitionDuration = transitionDuration ?? undefined;
183
+ if (screenDuration !== undefined)
184
+ screen.screenDuration = screenDuration ?? undefined;
185
+ project.screens = computeScreenPositions(project.screens);
186
+ await api.updateProject(project_id, {
187
+ ...project,
188
+ screens: project.screens,
189
+ updatedAt: new Date().toISOString(),
190
+ });
191
+ return {
192
+ content: [
193
+ {
194
+ type: "text",
195
+ text: JSON.stringify({
196
+ screenId: screen_id,
197
+ message: `Screen "${screen.name}" updated.`,
198
+ }, null, 2),
199
+ },
200
+ ],
201
+ };
202
+ });
203
+ server.tool("remove_screen", `Remove a screen and all its layers from the project.`, {
204
+ project_id: z.string().describe("Project ID"),
205
+ screen_id: z.string().describe("Screen ID to remove"),
206
+ }, async ({ project_id, screen_id }) => {
207
+ const project = await api.getProject(project_id);
208
+ const screenIndex = project.screens.findIndex((s) => s.id === screen_id);
209
+ if (screenIndex === -1) {
210
+ return {
211
+ content: [
212
+ {
213
+ type: "text",
214
+ text: `Error: Screen "${screen_id}" not found in project.`,
215
+ },
216
+ ],
217
+ isError: true,
218
+ };
219
+ }
220
+ const removed = project.screens.splice(screenIndex, 1)[0];
221
+ project.screens = computeScreenPositions(project.screens);
222
+ await api.updateProject(project_id, {
223
+ ...project,
224
+ screens: project.screens,
225
+ updatedAt: new Date().toISOString(),
226
+ });
227
+ return {
228
+ content: [
229
+ {
230
+ type: "text",
231
+ text: JSON.stringify({
232
+ message: `Screen "${removed.name}" removed.`,
233
+ remainingScreens: project.screens.length,
234
+ }, null, 2),
235
+ },
236
+ ],
237
+ };
238
+ });
239
+ server.tool("connect_screens", `Mark a sequence of screens as connected into a panoramic strip.
240
+
241
+ HOW IT WORKS:
242
+ - Connected screens render with zero gap between them
243
+ - Layers can extend past the screen edge (x + width > ${CANVAS_WIDTH}) and visually appear on the adjacent screen
244
+ - Example: A device at x=700, width=1000 on screen 1 extends 410px into screen 2
245
+ - In video mode, connected screens automatically use a slide-left transition
246
+
247
+ To disconnect, call with a single screen ID or set connectedToNext=false.`, {
248
+ project_id: z.string().describe("Project ID"),
249
+ screen_ids: z
250
+ .array(z.string())
251
+ .describe("Ordered array of screen IDs to connect"),
252
+ }, async ({ project_id, screen_ids }) => {
253
+ const project = await api.getProject(project_id);
254
+ // Validate all screen IDs exist
255
+ for (const sid of screen_ids) {
256
+ if (!project.screens.find((s) => s.id === sid)) {
257
+ return {
258
+ content: [
259
+ {
260
+ type: "text",
261
+ text: `Error: Screen "${sid}" not found in project.`,
262
+ },
263
+ ],
264
+ isError: true,
265
+ };
266
+ }
267
+ }
268
+ // Only modify screens in the input array (additive, not replace-all)
269
+ for (let i = 0; i < screen_ids.length; i++) {
270
+ const screen = project.screens.find((s) => s.id === screen_ids[i]);
271
+ if (screen) {
272
+ // All except the last in the array get connected; last terminates the strip
273
+ screen.connectedToNext = i < screen_ids.length - 1;
274
+ }
275
+ }
276
+ project.screens = computeScreenPositions(project.screens);
277
+ await api.updateProject(project_id, {
278
+ ...project,
279
+ screens: project.screens,
280
+ updatedAt: new Date().toISOString(),
281
+ });
282
+ return {
283
+ content: [
284
+ {
285
+ type: "text",
286
+ text: JSON.stringify({
287
+ message: `${screen_ids.length} screens connected into a strip.`,
288
+ connectedScreenIds: screen_ids,
289
+ }, null, 2),
290
+ },
291
+ ],
292
+ };
293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AAE,MAAe;oBACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAClB;wBACE,OAAO,EAAE,GAAG,UAAU,CAAC,MAAM,kCAAkC;wBAC/D,kBAAkB,EAAE,UAAU;qBAC/B,EACD,IAAI,EACJ,CAAC,CACF;iBACF;aACF;SACF,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import type { ApiClient } from "../api-client.js";
3
+ export declare function registerVideoTools(server: McpServer, api: ApiClient): void;
4
+ //# sourceMappingURL=video.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"video.d.ts","sourceRoot":"","sources":["../../src/tools/video.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AA2DlD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,GAAG,IAAI,CAqH1E"}