creavit-studio-mcp 1.3.7 → 1.3.8
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/package.json +1 -1
- package/src/tools/editorTools.mjs +68 -20
package/package.json
CHANGED
|
@@ -69,7 +69,9 @@ export function editorTools() {
|
|
|
69
69
|
}),
|
|
70
70
|
color: S.string("CSS color for a solid background"),
|
|
71
71
|
image: S.string("Image URL, local path, or a CMS wallpaper name"),
|
|
72
|
-
wallpaper: S.string(
|
|
72
|
+
wallpaper: S.string(
|
|
73
|
+
"CMS wallpaper name (see creavit_editor_wallpapers)",
|
|
74
|
+
),
|
|
73
75
|
blur: S.number("Image blur amount"),
|
|
74
76
|
gradient: S.object(
|
|
75
77
|
"Gradient configuration: {type, direction, colors:[{color,position}]}.",
|
|
@@ -79,7 +81,10 @@ export function editorTools() {
|
|
|
79
81
|
["type"],
|
|
80
82
|
),
|
|
81
83
|
mapResult: (result) =>
|
|
82
|
-
textResult({
|
|
84
|
+
textResult({
|
|
85
|
+
...result,
|
|
86
|
+
note: "Applied. Call creavit_project_save to persist.",
|
|
87
|
+
}),
|
|
83
88
|
}),
|
|
84
89
|
|
|
85
90
|
bridgeTool({
|
|
@@ -108,7 +113,10 @@ export function editorTools() {
|
|
|
108
113
|
}),
|
|
109
114
|
timeoutMs: 60_000,
|
|
110
115
|
mapResult: (result) =>
|
|
111
|
-
textResult({
|
|
116
|
+
textResult({
|
|
117
|
+
...result,
|
|
118
|
+
note: "Applied. Call creavit_project_save to persist.",
|
|
119
|
+
}),
|
|
112
120
|
}),
|
|
113
121
|
|
|
114
122
|
bridgeTool({
|
|
@@ -119,16 +127,39 @@ export function editorTools() {
|
|
|
119
127
|
}),
|
|
120
128
|
|
|
121
129
|
bridgeTool({
|
|
122
|
-
name: "
|
|
123
|
-
command: "editor.
|
|
130
|
+
name: "creavit_editor_reframe",
|
|
131
|
+
command: "editor.reframe",
|
|
124
132
|
description:
|
|
125
|
-
"
|
|
133
|
+
"Re-frames the whole composition for another aspect ratio in ONE call — use this for \"make it vertical / for mobile / a story\" requests instead of setting the ratio and then nudging padding, camera and zooms by hand. Ask the user which format they want first (9:16 story, 4:5 or 1:1 feed, 3:4) when they did not say. It sets the ratio, refits padding/radius so the content stays as large as possible, enlarges the camera and anchors it bottom-center so it reads on a narrow frame, and scales the cursor. Existing zooms are preserved untouched unless tightenZooms is true. Call creavit_project_save afterwards.",
|
|
126
134
|
inputSchema: schema(
|
|
127
|
-
{
|
|
128
|
-
|
|
135
|
+
{
|
|
136
|
+
ratio: S.string("16:9, 9:16, 1:1, 4:3, 3:4, or empty string for auto", {
|
|
137
|
+
enum: ["", "16:9", "9:16", "1:1", "4:3", "3:4"],
|
|
138
|
+
}),
|
|
139
|
+
cameraPlacement: S.string("bottom | top | keep", {
|
|
140
|
+
enum: ["bottom", "top", "keep"],
|
|
141
|
+
}),
|
|
142
|
+
tightenZooms: S.bool(
|
|
143
|
+
"Raise low zoom scales so text stays readable on a phone (default false)",
|
|
144
|
+
),
|
|
145
|
+
},
|
|
146
|
+
["ratio"],
|
|
129
147
|
),
|
|
148
|
+
}),
|
|
149
|
+
|
|
150
|
+
bridgeTool({
|
|
151
|
+
name: "creavit_editor_camera_set",
|
|
152
|
+
command: "editor.setCamera",
|
|
153
|
+
description:
|
|
154
|
+
"Partially updates camera overlay settings: visible, size, radius, shadow, position crop, cropZoom, followMouse, oscillationMovement, mirror, aspectRatio, border, background removal, mergeWithCursor, lockSizeOnZoom and sizeOnZoom. Background removal is a real toggle: pass removeBackground (or optimizedBackgroundRemoval) true/false and the app loads the segmentation engine and starts the pipeline, exactly like the settings panel does — optionally tune it with optimizedBackgroundRemovalSettings. Call creavit_project_save afterwards.",
|
|
155
|
+
inputSchema: schema({ settings: S.object("Camera settings to update") }, [
|
|
156
|
+
"settings",
|
|
157
|
+
]),
|
|
130
158
|
mapResult: (result) =>
|
|
131
|
-
textResult({
|
|
159
|
+
textResult({
|
|
160
|
+
...result,
|
|
161
|
+
note: "Applied. Call creavit_project_save to persist.",
|
|
162
|
+
}),
|
|
132
163
|
}),
|
|
133
164
|
|
|
134
165
|
{
|
|
@@ -144,7 +175,8 @@ export function editorTools() {
|
|
|
144
175
|
["action"],
|
|
145
176
|
),
|
|
146
177
|
run: async ({ action }) => {
|
|
147
|
-
if (action === "status")
|
|
178
|
+
if (action === "status")
|
|
179
|
+
return textResult(await callCommand("editor.getAudio", {}));
|
|
148
180
|
if (action !== "mute" && action !== "unmute") {
|
|
149
181
|
throw new Error("`action` must be status, mute, or unmute");
|
|
150
182
|
}
|
|
@@ -207,7 +239,8 @@ export function editorTools() {
|
|
|
207
239
|
bridgeTool({
|
|
208
240
|
name: "creavit_editor_perspectives",
|
|
209
241
|
command: "editor.listPerspectives",
|
|
210
|
-
description:
|
|
242
|
+
description:
|
|
243
|
+
"Lists all perspective (3D animation) ranges on the timeline.",
|
|
211
244
|
inputSchema: schema(),
|
|
212
245
|
}),
|
|
213
246
|
|
|
@@ -228,7 +261,8 @@ export function editorTools() {
|
|
|
228
261
|
bridgeTool({
|
|
229
262
|
name: "creavit_editor_update_perspective",
|
|
230
263
|
command: "editor.updatePerspective",
|
|
231
|
-
description:
|
|
264
|
+
description:
|
|
265
|
+
"Updates an existing perspective range by id or zero-based index.",
|
|
232
266
|
inputSchema: schema(
|
|
233
267
|
{
|
|
234
268
|
id: S.string("Perspective range ID"),
|
|
@@ -242,7 +276,8 @@ export function editorTools() {
|
|
|
242
276
|
bridgeTool({
|
|
243
277
|
name: "creavit_editor_remove_perspective",
|
|
244
278
|
command: "editor.removePerspective",
|
|
245
|
-
description:
|
|
279
|
+
description:
|
|
280
|
+
"Deletes a perspective range by id/index, or all perspective ranges with all=true.",
|
|
246
281
|
inputSchema: schema({
|
|
247
282
|
id: S.string("Perspective range ID"),
|
|
248
283
|
index: S.number("Perspective range index"),
|
|
@@ -274,7 +309,9 @@ export function editorTools() {
|
|
|
274
309
|
command: "editor.seek",
|
|
275
310
|
description:
|
|
276
311
|
"Moves the playhead to the given time and renders that frame. Combine with creavit_editor_screenshot to inspect a specific moment.",
|
|
277
|
-
inputSchema: schema({ time: S.number("Target time in seconds") }, [
|
|
312
|
+
inputSchema: schema({ time: S.number("Target time in seconds") }, [
|
|
313
|
+
"time",
|
|
314
|
+
]),
|
|
278
315
|
}),
|
|
279
316
|
|
|
280
317
|
{
|
|
@@ -304,8 +341,15 @@ export function editorTools() {
|
|
|
304
341
|
timeoutMs: 120_000,
|
|
305
342
|
mapResult: (result) => ({
|
|
306
343
|
content: [
|
|
307
|
-
{
|
|
308
|
-
|
|
344
|
+
{
|
|
345
|
+
type: "image",
|
|
346
|
+
data: result.base64,
|
|
347
|
+
mimeType: result.mimeType || "image/png",
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
type: "text",
|
|
351
|
+
text: `Canvas frame @ ${Number(result.atTime || 0).toFixed(2)}s`,
|
|
352
|
+
},
|
|
309
353
|
],
|
|
310
354
|
}),
|
|
311
355
|
}),
|
|
@@ -314,7 +358,7 @@ export function editorTools() {
|
|
|
314
358
|
name: "creavit_editor_export",
|
|
315
359
|
command: "editor.export",
|
|
316
360
|
description:
|
|
317
|
-
"Exports the video idempotently; concurrent retries share one render. This takes a LONG time (minutes). Follow progress with creavit_events (export.started / export.finished / export.failed), then use creavit_file_open when the user asks to open/play it. If filePath is omitted, the export is written beside the open .crvt project.",
|
|
361
|
+
"Exports the video idempotently; concurrent retries share one render. This takes a LONG time (minutes). Follow progress with creavit_events (export.started / export.finished / export.failed), then use creavit_file_open when the user asks to open/play it. If filePath is omitted, the export is written beside the open .crvt project. Exporting requires an active Creavit Studio license, or a remaining free export credit. When neither is available the export is REFUSED before any rendering starts and the error explains why (expired license / free credits used up); relay that message to the user in their own language and point them at the purchase page instead of retrying.",
|
|
318
362
|
inputSchema: schema({
|
|
319
363
|
filePath: S.string("Target file path (.mp4)"),
|
|
320
364
|
format: S.string("mp4 or gif", { enum: ["mp4", "gif"] }),
|
|
@@ -329,14 +373,18 @@ export function editorTools() {
|
|
|
329
373
|
name: "creavit_editor_export_start",
|
|
330
374
|
command: "editor.export.start",
|
|
331
375
|
description:
|
|
332
|
-
"Starts one export in the background and returns immediately. Use this when tool latency matters. Progress/completion is reported by creavit_events; set openWhenFinished=true to open/play the result automatically without showing export UI.",
|
|
376
|
+
"Starts one export in the background and returns immediately. Use this when tool latency matters. Progress/completion is reported by creavit_events; set openWhenFinished=true to open/play the result automatically without showing export UI. Exporting requires an active Creavit Studio license, or a remaining free export credit. When neither is available the export is REFUSED before any rendering starts and the error explains why (expired license / free credits used up); relay that message to the user in their own language and point them at the purchase page instead of retrying.",
|
|
333
377
|
inputSchema: schema({
|
|
334
|
-
filePath: S.string(
|
|
378
|
+
filePath: S.string(
|
|
379
|
+
"Target file path (.mp4); omit to export beside the project",
|
|
380
|
+
),
|
|
335
381
|
format: S.string("mp4 or gif", { enum: ["mp4", "gif"] }),
|
|
336
382
|
resolution: S.string("e.g. 720p, 1080p, 4k"),
|
|
337
383
|
fps: S.number("Frame rate, e.g. 30 or 60"),
|
|
338
384
|
quality: S.string("compact | high | max"),
|
|
339
|
-
openWhenFinished: S.bool(
|
|
385
|
+
openWhenFinished: S.bool(
|
|
386
|
+
"Open the exported file automatically when rendering completes",
|
|
387
|
+
),
|
|
340
388
|
}),
|
|
341
389
|
timeoutMs: 30_000,
|
|
342
390
|
}),
|