@simpligen/mcp 0.11.1 → 0.12.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.
- package/README.md +4 -2
- package/package.json +1 -1
- package/src/bin.js +1 -1
- package/src/client.js +22 -0
- package/src/tools.js +184 -5
package/README.md
CHANGED
|
@@ -22,11 +22,13 @@ The easiest path is in the SimpliGen app: **Settings -> Connect an agent**, pick
|
|
|
22
22
|
|
|
23
23
|
`list_capabilities`, `get_status`, `list_projects`, `create_project`, `upload_file`, `generate`, `get_job`, `wait_for_result`, `list_jobs`, `cancel_job`, `prepare_preset`, `get_result_image`, `wait_for_approval`, `get_app_context`, `fill_generate_form`, `open_screen`, `accept_character_base`.
|
|
24
24
|
|
|
25
|
-
**Approval flow (SimpliGen's in-app Assistant).** A token the app issues for its own Assistant panel is flagged `approvalRequired`. With it, any call that queues a generation, renders or exports a film, runs a recipe, or deletes a character, product or outfit does not run. It returns `awaiting_approval` with a `proposalId`, and the user sees an approval card in the app. Call `wait_for_approval(proposalId)` (it long-polls in short rounds, like `wait_for_result`). It returns the real result once the user clicks Approve, or `declined` with the user's optional reason so you can adjust and propose again. For `regenerate_character_base`, the approved result carries a base job id: wait on it with `wait_for_result`, then call `accept_character_base`. Normal pairing tokens (Claude Desktop and other clients) never see this flow.
|
|
25
|
+
**Approval flow (SimpliGen's in-app Assistant).** A token the app issues for its own Assistant panel is flagged `approvalRequired`. With it, any call that queues a generation, renders or exports a film, runs a recipe, replaces a character's base picture, or deletes a character, product or outfit does not run. It returns `awaiting_approval` with a `proposalId`, and the user sees an approval card in the app. Call `wait_for_approval(proposalId)` (it long-polls in short rounds, like `wait_for_result`). It returns the real result once the user clicks Approve, or `declined` with the user's optional reason so you can adjust and propose again. For `regenerate_character_base`, the approved result carries a base job id: wait on it with `wait_for_result`, then call `accept_character_base`. Normal pairing tokens (Claude Desktop and other clients) never see this flow.
|
|
26
|
+
|
|
27
|
+
**Characters and their looks** (connector 0.12.0, SimpliGen 1.93 or newer): `update_character` changes a character's name, Description, fine details, custom feature text and profile; `set_character_base` replaces only the base picture with an upload or a finished image job; `list_looks`, `create_look`, `set_look_view` and `render_look_view` make a character's looks (the character in one outfit, seen from the front, in a portrait and from the back) the way the Looks page does. `open_screen` with `look` opens one look. Replacing the base picture, setting a look picture and rendering a look view are gated like the other character tools.
|
|
26
28
|
|
|
27
29
|
**Screen tools.** `get_app_context` returns what the user is looking at. `fill_generate_form` fills the visible Generate form and never presses Generate. `open_screen` navigates the app. They work for outside MCP clients too.
|
|
28
30
|
|
|
29
|
-
**Video Studio** (connector 0.5.0 or newer): `list_films`, `create_film`, `get_film`, `update_film_settings`, `add_track`, `move_track`, `detect_tempo`, `add_clip`, `import_clip` (0.8.1), `update_clip`, `move_clip`, `trim_clip`, `remove_clip`, `apply_film_plan`, `set_fades`, `add_marker`, `set_export_range`, `render_clips`, `wait_for_renders`, `list_takes`, `use_take`, `export_film`, `list_locations`, `create_location`, and the Wardrobe (0.10.0): `list_wardrobe`, `create_outfit`, `remove_outfit`. An agent can build a whole music video: a song, its tempo, clips on the bars, shots, renders and the export. With the film open in the Video Studio every change shows live and undoes with Ctrl+Z. They need the Video Studio in SimpliGen (SimpliGen 1.75 or newer). Since connector 0.8.0 they are always listed; without the studio each one answers `studio_not_installed`.
|
|
31
|
+
**Video Studio** (connector 0.5.0 or newer): `list_films`, `create_film`, `get_film`, `update_film_settings`, `add_track`, `move_track`, `detect_tempo`, `add_clip`, `import_clip` (0.8.1), `update_clip`, `set_cast_member` (0.12.0: a cast member's look, voice sample and how they sound), `move_clip`, `trim_clip`, `remove_clip`, `apply_film_plan`, `set_fades`, `add_marker`, `set_export_range`, `render_clips`, `wait_for_renders`, `list_takes`, `use_take`, `export_film`, `list_locations`, `create_location`, and the Wardrobe (0.10.0): `list_wardrobe`, `create_outfit`, `remove_outfit`. Text, pictures, animations, transitions and captions (0.12.0, SimpliGen 1.93 or newer): `add_text` (titles and lower thirds in any of 18 looks), `add_image`, `set_layout` (place, size, turn and fade a text, picture or picture in picture), `set_animation` (In, Out and Loop), `set_transition` (21 kinds on a cut, overlapping the clips or keeping them in place, or on every cut at once), `link_to_clip` (a title, picture or sound follows its clip), `make_subtitles`, `import_srt`, `split_caption`, `merge_caption`, and the project bin: `add_to_media`, `remove_from_media`. An agent can build a whole music video: a song, its tempo, clips on the bars, shots, renders and the export. With the film open in the Video Studio every change shows live and undoes with Ctrl+Z. They need the Video Studio in SimpliGen (SimpliGen 1.75 or newer). Since connector 0.8.0 they are always listed; without the studio each one answers `studio_not_installed`.
|
|
30
32
|
|
|
31
33
|
`get_result_image` returns a completed job's result image inline (a viewable image block) so the agent can display it in chat. Claude clients cap a tool result at ~1MB and only render base64 image blocks, so large renders are re-encoded to a **full-resolution WebP** preview (same dimensions; quality steps down, and only very large images are resized) that fits the cap. The uncompressed original file path is always included in the caption, so the agent keeps the full-quality artifact. Video results return the file path instead.
|
|
32
34
|
|
package/package.json
CHANGED
package/src/bin.js
CHANGED
package/src/client.js
CHANGED
|
@@ -119,6 +119,12 @@ export class ControlApiClient {
|
|
|
119
119
|
enhanceCharacterMedia(id, args) { return this.#req('POST', `/characters/${encodeURIComponent(id)}/enhance`, args); }
|
|
120
120
|
regenerateCharacterBase(id, args) { return this.#req('POST', `/characters/${encodeURIComponent(id)}/regenerate-base`, args); }
|
|
121
121
|
removeCharacter(id) { return this.#req('DELETE', `/characters/${encodeURIComponent(id)}`); }
|
|
122
|
+
updateCharacter(id, args) { return this.#req('PATCH', `/characters/${encodeURIComponent(id)}`, args); }
|
|
123
|
+
setCharacterBase(id, args) { return this.#req('POST', `/characters/${encodeURIComponent(id)}/base`, args); }
|
|
124
|
+
listLooks(id) { return this.#req('GET', `/characters/${encodeURIComponent(id)}/looks`); }
|
|
125
|
+
createLook(id, args) { return this.#req('POST', `/characters/${encodeURIComponent(id)}/looks`, args); }
|
|
126
|
+
setLookView(id, lookId, view, args) { return this.#req('POST', `/characters/${encodeURIComponent(id)}/looks/${encodeURIComponent(lookId)}/views/${encodeURIComponent(view)}`, args); }
|
|
127
|
+
renderLookView(id, lookId, args) { return this.#req('POST', `/characters/${encodeURIComponent(id)}/looks/${encodeURIComponent(lookId)}/render`, args); }
|
|
122
128
|
|
|
123
129
|
listRecipeBlocks() { return this.#req('GET', '/recipe-blocks'); }
|
|
124
130
|
composeRecipe(args) { return this.#req('POST', '/recipes', args); }
|
|
@@ -142,6 +148,7 @@ export class ControlApiClient {
|
|
|
142
148
|
createFilm(args) { return this.#req('POST', '/films', args); }
|
|
143
149
|
getFilm(filmId) { return this.#req('GET', this.#film(filmId)); }
|
|
144
150
|
updateFilmSettings(filmId, args) { return this.#req('PATCH', this.#film(filmId), args); }
|
|
151
|
+
setCastMember(filmId, args) { return this.#req('POST', this.#film(filmId, '/cast-member'), args); }
|
|
145
152
|
addTrack(filmId, args) { return this.#req('POST', this.#film(filmId, '/tracks'), args); }
|
|
146
153
|
moveTrack(filmId, track, args) { return this.#req('PATCH', this.#film(filmId, `/tracks/${encodeURIComponent(String(track))}`), args); }
|
|
147
154
|
detectTempo(filmId, args = {}) { return this.#req('POST', this.#film(filmId, '/tempo'), args); }
|
|
@@ -153,6 +160,21 @@ export class ControlApiClient {
|
|
|
153
160
|
removeClip(filmId, clip) { return this.#req('DELETE', this.#clip(filmId, clip)); }
|
|
154
161
|
applyFilmPlan(filmId, plan) { return this.#req('POST', this.#film(filmId, '/plan'), plan); }
|
|
155
162
|
setFades(filmId, args) { return this.#req('POST', this.#film(filmId, '/fades'), args); }
|
|
163
|
+
addText(filmId, args) { return this.#req('POST', this.#film(filmId, '/texts'), args); }
|
|
164
|
+
makeSubtitles(filmId) { return this.#req('POST', this.#film(filmId, '/subtitles'), {}); }
|
|
165
|
+
addImage(filmId, args) { return this.#req('POST', this.#film(filmId, '/images'), args); }
|
|
166
|
+
setLayout(filmId, clip, args) { return this.#req('POST', this.#clip(filmId, clip, '/layout'), args); }
|
|
167
|
+
setTransition(filmId, clip, args) {
|
|
168
|
+
if (args?.allCuts) return this.#req('POST', this.#film(filmId, '/transitions'), args);
|
|
169
|
+
return this.#req('POST', this.#clip(filmId, clip, '/transition'), args);
|
|
170
|
+
}
|
|
171
|
+
setAnimation(filmId, clip, args) { return this.#req('POST', this.#clip(filmId, clip, '/animation'), args); }
|
|
172
|
+
splitCaption(filmId, clip, args) { return this.#req('POST', this.#clip(filmId, clip, '/split-caption'), args); }
|
|
173
|
+
mergeCaption(filmId, clip) { return this.#req('POST', this.#clip(filmId, clip, '/merge-caption'), {}); }
|
|
174
|
+
importSrt(filmId, args) { return this.#req('POST', this.#film(filmId, '/srt'), args); }
|
|
175
|
+
addToMedia(filmId, args) { return this.#req('POST', this.#film(filmId, '/media'), args); }
|
|
176
|
+
linkToClip(filmId, args) { return this.#req('POST', this.#film(filmId, '/link'), args); }
|
|
177
|
+
removeFromMedia(filmId, mediaId) { return this.#req('DELETE', this.#film(filmId, `/media/${encodeURIComponent(String(mediaId))}`)); }
|
|
156
178
|
addMarker(filmId, args) { return this.#req('POST', this.#film(filmId, '/markers'), args); }
|
|
157
179
|
setExportRange(filmId, args) { return this.#req('POST', this.#film(filmId, '/export-range'), args); }
|
|
158
180
|
renderClips(filmId, args = {}) { return this.#req('POST', this.#film(filmId, '/renders'), args); }
|
package/src/tools.js
CHANGED
|
@@ -15,11 +15,14 @@ export const TOOL_NAMES = [
|
|
|
15
15
|
'remove_character', 'create_character', 'generate_character_image', 'generate_character_video',
|
|
16
16
|
'generate_character_frame', 'animate_character', 'set_character_preset',
|
|
17
17
|
'enhance_character_media', 'regenerate_character_base', 'accept_character_base',
|
|
18
|
+
'update_character', 'set_character_base', 'list_looks', 'create_look', 'set_look_view', 'render_look_view',
|
|
18
19
|
'list_recipe_blocks', 'compose_recipe', 'validate_recipe', 'list_recipes', 'get_recipe', 'publish_recipe',
|
|
19
20
|
'run_recipe', 'get_recipe_run', 'wait_for_recipe_run', 'list_recipe_runs', 'cancel_recipe_run',
|
|
20
21
|
'list_subjects', 'list_products', 'create_product', 'remove_product',
|
|
21
22
|
'list_films', 'create_film', 'get_film', 'update_film_settings', 'add_track', 'move_track', 'detect_tempo',
|
|
22
|
-
'add_clip', 'import_clip', 'update_clip', 'move_clip', 'trim_clip', 'remove_clip', 'apply_film_plan', 'set_fades', 'add_marker',
|
|
23
|
+
'add_clip', 'import_clip', 'update_clip', 'set_cast_member', 'move_clip', 'trim_clip', 'remove_clip', 'apply_film_plan', 'set_fades', 'add_marker',
|
|
24
|
+
'add_text', 'make_subtitles', 'add_image', 'set_layout', 'set_transition',
|
|
25
|
+
'set_animation', 'split_caption', 'merge_caption', 'import_srt', 'add_to_media', 'remove_from_media', 'link_to_clip',
|
|
23
26
|
'set_export_range', 'render_clips', 'wait_for_renders', 'list_takes', 'use_take', 'export_film', 'list_locations', 'create_location',
|
|
24
27
|
'list_wardrobe', 'create_outfit', 'remove_outfit',
|
|
25
28
|
];
|
|
@@ -269,9 +272,10 @@ export function registerTools(server, client, { now = Date.now, sleep = (ms) =>
|
|
|
269
272
|
wrap((a) => client.fillGenerateForm(a)));
|
|
270
273
|
|
|
271
274
|
server.registerTool('open_screen',
|
|
272
|
-
{ title: 'Open a screen', description: 'Take the user to a screen in SimpliGen. id selects a character when screen is "character". "wardrobe" is the Library\'s outfits.', inputSchema: {
|
|
273
|
-
screen: z.enum(['generate', 'gallery', 'characters', 'character', 'video-studio', 'prompt-library', 'settings', 'wardrobe']),
|
|
275
|
+
{ title: 'Open a screen', description: 'Take the user to a screen in SimpliGen. id selects a character when screen is "character". "look" opens one look\'s page: id is the character and lookId the look (from list_looks); it needs the Video Studio. "wardrobe" is the Library\'s outfits.', inputSchema: {
|
|
276
|
+
screen: z.enum(['generate', 'gallery', 'characters', 'character', 'look', 'video-studio', 'prompt-library', 'settings', 'wardrobe']),
|
|
274
277
|
id: z.string().optional(),
|
|
278
|
+
lookId: z.string().optional().describe('The look to open when screen is "look".'),
|
|
275
279
|
} },
|
|
276
280
|
wrap((a) => client.openScreen(a)));
|
|
277
281
|
|
|
@@ -290,7 +294,7 @@ export function registerTools(server, client, { now = Date.now, sleep = (ms) =>
|
|
|
290
294
|
wrap(() => client.listCharacterFeatures()));
|
|
291
295
|
|
|
292
296
|
server.registerTool('list_character_presets',
|
|
293
|
-
{ title: 'List character presets', description: 'List generation presets available for Character Studio. Returns base, identityEdit, and i2v presets as well as enhanceImage and enhanceVideo presets (each with supportedScales). Use the returned ids as presetId/imagePresetId/videoPresetId/basePresetId arguments in other character tools.', inputSchema: {} },
|
|
297
|
+
{ title: 'List character presets', description: 'List generation presets available for Character Studio. Returns base, identityEdit, and i2v presets as well as enhanceImage and enhanceVideo presets (each with supportedScales). Each base, identityEdit and i2v entry has modelsDownloaded: false means its pack is installed but its model files are not on this PC, so a local run fails until they are downloaded (prepare_preset) while a cloud run can still use it. Use the returned ids as presetId/imagePresetId/videoPresetId/basePresetId arguments in other character tools.', inputSchema: {} },
|
|
294
298
|
wrap(() => client.listCharacterPresets()));
|
|
295
299
|
|
|
296
300
|
server.registerTool('remove_character',
|
|
@@ -497,6 +501,85 @@ export function registerTools(server, client, { now = Date.now, sleep = (ms) =>
|
|
|
497
501
|
},
|
|
498
502
|
wrap(({ characterId, jobId }) => client.acceptBase(characterId, { altImageId: jobId })));
|
|
499
503
|
|
|
504
|
+
// ---- A character's own words, its base picture, and its looks ----
|
|
505
|
+
|
|
506
|
+
server.registerTool('update_character',
|
|
507
|
+
{
|
|
508
|
+
title: 'Update a character',
|
|
509
|
+
description: 'Change a character\'s words, as the Character Creator edits them. Only the fields you pass change. description is the Description: how the person looks, which is what a film sends about them. fineDetails are small details (a scar, freckles, a tattoo on the left forearm) and customText is your own words for a feature that takes them (featureId to text, an empty string removes one); both go into the base prompt, so a later regenerate_character_base draws them. The base picture itself does not change.',
|
|
510
|
+
inputSchema: {
|
|
511
|
+
characterId: z.string(),
|
|
512
|
+
name: z.string().optional(),
|
|
513
|
+
description: z.string().optional().describe('How the person looks, in your own words'),
|
|
514
|
+
fineDetails: z.string().optional(),
|
|
515
|
+
customText: z.record(z.string()).optional().describe('featureId to your own words, for features with allowCustom (list_character_features)'),
|
|
516
|
+
bio: z.string().optional(),
|
|
517
|
+
location: z.string().optional().describe('Where the character lives or is from (profile), not a film location'),
|
|
518
|
+
},
|
|
519
|
+
},
|
|
520
|
+
wrap(({ characterId, ...fields }) => client.updateCharacter(characterId, fields)));
|
|
521
|
+
|
|
522
|
+
server.registerTool('set_character_base',
|
|
523
|
+
{
|
|
524
|
+
title: 'Set the base picture',
|
|
525
|
+
description: 'Replace only the character\'s base picture with an uploaded image (handle from upload_file) or a finished image job (jobId). Identity, base prompt and presets stay as they are. Looks keep their pictures; views made after this start from the new base. The old base picture is gone.' + APPROVAL_NOTE,
|
|
526
|
+
inputSchema: {
|
|
527
|
+
characterId: z.string(),
|
|
528
|
+
handle: z.string().optional().describe('upload_file handle of the new base picture'),
|
|
529
|
+
jobId: z.string().optional().describe('A finished image job whose result becomes the base'),
|
|
530
|
+
},
|
|
531
|
+
},
|
|
532
|
+
wrap(({ characterId, handle, jobId }) => client.setCharacterBase(characterId, { handle, jobId })));
|
|
533
|
+
|
|
534
|
+
server.registerTool('list_looks',
|
|
535
|
+
{
|
|
536
|
+
title: 'List a character\'s looks',
|
|
537
|
+
description: 'A character\'s looks: each look is the character in one outfit. Returns id, name, the outfit (wardrobeId, outfitText and effectiveOutfitText, the words it is generated from), and per view its status and file. A look is complete when it has full-body-front, portrait-front and full-body-back; missingViews says which are still needed. The Video Studio casts a character in a look.',
|
|
538
|
+
inputSchema: { characterId: z.string() },
|
|
539
|
+
},
|
|
540
|
+
wrap(({ characterId }) => client.listLooks(characterId)));
|
|
541
|
+
|
|
542
|
+
server.registerTool('create_look',
|
|
543
|
+
{
|
|
544
|
+
title: 'Create a look',
|
|
545
|
+
description: 'Make a look: the character in an outfit. Pass wardrobeId (an outfit from list_wardrobe or create_outfit) and/or outfitText (every garment, its cut, colour, material and fit; with a wardrobeId it adds how this character wears it). The look starts with no pictures: make them with render_look_view (full-body-front first, then portrait-front and full-body-back), or set them from your own images with set_look_view.',
|
|
546
|
+
inputSchema: {
|
|
547
|
+
characterId: z.string(),
|
|
548
|
+
name: z.string().optional().describe('Shown on the Looks page; defaults to the outfit\'s name'),
|
|
549
|
+
wardrobeId: z.string().optional(),
|
|
550
|
+
outfitText: z.string().optional(),
|
|
551
|
+
},
|
|
552
|
+
},
|
|
553
|
+
wrap(({ characterId, ...args }) => client.createLook(characterId, args)));
|
|
554
|
+
|
|
555
|
+
server.registerTool('set_look_view',
|
|
556
|
+
{
|
|
557
|
+
title: 'Set a look picture',
|
|
558
|
+
description: 'Use an existing image as one view of a look: an uploaded image (handle from upload_file) or a finished image job (jobId). Replaces what the view held; the old picture is gone. Views: full-body-front, portrait-front, full-body-back, portrait-side, full-body-side. Each is a 9:16 picture (portraits 3:4) of the person alone on a plain background.' + APPROVAL_NOTE,
|
|
559
|
+
inputSchema: {
|
|
560
|
+
characterId: z.string(),
|
|
561
|
+
lookId: z.string(),
|
|
562
|
+
view: z.enum(['full-body-front', 'portrait-front', 'full-body-back', 'portrait-side', 'full-body-side']),
|
|
563
|
+
handle: z.string().optional(),
|
|
564
|
+
jobId: z.string().optional(),
|
|
565
|
+
},
|
|
566
|
+
},
|
|
567
|
+
wrap(({ characterId, lookId, view, handle, jobId }) => client.setLookView(characterId, lookId, view, { handle, jobId })));
|
|
568
|
+
|
|
569
|
+
server.registerTool('render_look_view',
|
|
570
|
+
{
|
|
571
|
+
title: 'Render a look picture',
|
|
572
|
+
description: 'Generate one view of a look on this PC, the way the Looks page\'s Generate does: full-body-front from the base picture and the outfit, then portrait-front and full-body-back from the finished front so hair and outfit match (asking for those first is refused). Uses the character\'s reference model unless presetId names another identityEdit preset from list_character_presets. prompt replaces the default words. Returns a jobId: wait_for_result, then list_looks shows the view.' + APPROVAL_NOTE,
|
|
573
|
+
inputSchema: {
|
|
574
|
+
characterId: z.string(),
|
|
575
|
+
lookId: z.string(),
|
|
576
|
+
view: z.enum(['full-body-front', 'portrait-front', 'full-body-back', 'portrait-side', 'full-body-side']).optional().describe('Default full-body-front'),
|
|
577
|
+
presetId: z.string().optional(),
|
|
578
|
+
prompt: z.string().optional(),
|
|
579
|
+
},
|
|
580
|
+
},
|
|
581
|
+
wrap(({ characterId, lookId, ...args }) => client.renderLookView(characterId, lookId, args)));
|
|
582
|
+
|
|
500
583
|
// --- Recipe authoring: compose multi-step recipes out of packs/presets ---
|
|
501
584
|
|
|
502
585
|
const recipeStep = z.object({
|
|
@@ -657,6 +740,7 @@ export function registerTools(server, client, { now = Date.now, sleep = (ms) =>
|
|
|
657
740
|
hires2x: z.boolean().optional(), renderOn: z.enum(['local', 'cloud']).optional(),
|
|
658
741
|
presets: z.object({ t2v: z.string().optional(), i2v: z.string().optional(), r2v: z.string().optional() }).optional(),
|
|
659
742
|
subject: z.string().optional(), cast: people.optional(), location: z.string().nullable().optional().describe('A location by name or id; null for none.'),
|
|
743
|
+
transitionMode: z.enum(['overlap', 'hold']).optional().describe('What a NEW transition does: overlap (default; both clips play, later clips slide left) or hold (nothing moves; use for a music video cut to a song).'),
|
|
660
744
|
} },
|
|
661
745
|
wrap(({ filmId: id, ...rest }) => client.updateFilmSettings(id, rest)));
|
|
662
746
|
|
|
@@ -690,15 +774,30 @@ export function registerTools(server, client, { now = Date.now, sleep = (ms) =>
|
|
|
690
774
|
} },
|
|
691
775
|
wrap(({ filmId: id, ...rest }) => client.importClip(id, rest)));
|
|
692
776
|
|
|
777
|
+
// How text looks (milestone 20), shared by add_text and update_clip.
|
|
778
|
+
const textStyle = z.object({ font: z.enum(['Inter', 'Montserrat', 'Bebas Neue', 'Playfair Display', 'Roboto Mono']).optional(), size: num.optional().describe('Text height as a share of the frame height, e.g. 0.05'), color: z.string().optional(), weight: num.optional(), align: z.enum(['left', 'center', 'right']).optional() });
|
|
779
|
+
|
|
693
780
|
server.registerTool('update_clip',
|
|
694
781
|
{ title: 'Update a clip', description: 'Write a clip in one step: its shots, who is in it (cast: as many people as its preset holds) and where (location: a name or id, "none" to drop the film\'s, "film" to inherit it again), how it starts (link: fresh, continue from the clip before, or motion, which needs LTX 2.5 on both clips, with no cast and no last frame, and is refused otherwise), which tracks it hears, and its preset.', inputSchema: {
|
|
695
782
|
filmId, clip: clipRef, shots: shots.optional(), cast: people.optional(),
|
|
696
783
|
location: z.string().optional(), link: z.enum(['fresh', 'continue', 'motion', 'none', 'frame']).optional(),
|
|
697
784
|
hears: z.array(z.object({ track: trackRef, on: z.boolean() })).optional().describe('Which tracks the clip\'s render hears, e.g. [{ "track": "Song", "on": false }].'),
|
|
698
785
|
preset: z.string().nullable().optional().describe('This clip\'s own preset (pack:preset); null to follow the film.'),
|
|
786
|
+
text: z.string().optional().describe('A text item only: its new text.'),
|
|
787
|
+
style: textStyle.optional().describe('A text item only: what to change about its look.'),
|
|
699
788
|
} },
|
|
700
789
|
wrap(({ filmId: id, clip, ...rest }) => client.updateClip(id, clip, rest)));
|
|
701
790
|
|
|
791
|
+
server.registerTool('set_cast_member',
|
|
792
|
+
{ title: 'Set up a cast member', description: 'What one person in a cast wears and how they sound, as the cast panel sets it. Leave clip out for the film\'s cast; with clip, it is for that clip only (a film member gets an override there). The person must already be in that cast (update_film_settings or update_clip cast). look: a look id or name from list_looks, which needs its front picture. voice: the upload_file handle of a few seconds of the person speaking (null takes it off); models that take a voice speak their lines in it. voiceNote: How they sound, words said the first time they speak (e.g. "warm, low, a little husky"); "" clears it. Naming a cast again keeps what was set on the people still in it.', inputSchema: {
|
|
793
|
+
filmId, clip: clipRef.optional(), who: z.string().describe('The cast member: a character\'s name or id'),
|
|
794
|
+
look: z.string().optional(),
|
|
795
|
+
voice: z.string().nullable().optional(),
|
|
796
|
+
voiceName: z.string().optional().describe('The voice file\'s name to show in the cast panel'),
|
|
797
|
+
voiceNote: z.string().optional(),
|
|
798
|
+
} },
|
|
799
|
+
wrap(({ filmId: id, ...rest }) => client.setCastMember(id, rest)));
|
|
800
|
+
|
|
702
801
|
server.registerTool('move_clip',
|
|
703
802
|
{ title: 'Move a clip', description: 'Move a clip to a new start, or to another video lane (leave `at` out to keep its start).', inputSchema: { filmId, clip: clipRef, at: at.nullable().optional(), lane: z.string().nullable().optional().describe('A video lane by id or name (videoLanes in get_film).') } },
|
|
704
803
|
wrap(({ filmId: id, clip, ...rest }) => client.moveClip(id, clip, dropNull(rest, ['at']))));
|
|
@@ -727,6 +826,86 @@ export function registerTools(server, client, { now = Date.now, sleep = (ms) =>
|
|
|
727
826
|
{ title: 'Set fades', description: 'Fade a clip or a track in and out, in seconds.', inputSchema: { filmId, target: z.union([z.string(), z.number()]).describe('A clip (id, name or number) or a track (name or id).'), fadeIn: num.optional(), fadeOut: num.optional() } },
|
|
728
827
|
wrap(({ filmId: id, ...rest }) => client.setFades(id, rest)));
|
|
729
828
|
|
|
829
|
+
const place = z.object({
|
|
830
|
+
x: num.optional().describe('Centre across the frame, 0 (left) to 1 (right)'),
|
|
831
|
+
y: num.optional().describe('Centre down the frame, 0 (top) to 1 (bottom)'),
|
|
832
|
+
size: num.optional().describe('Width as a share of the frame width, 0.02 to 1'),
|
|
833
|
+
opacity: num.optional().describe('0 (invisible) to 1'),
|
|
834
|
+
});
|
|
835
|
+
|
|
836
|
+
server.registerTool('add_text',
|
|
837
|
+
{ title: 'Add text', description: 'Put text on a row above the film: a title, a lower third, a subtitle or a callout. It goes on the top row (or a new Text row) unless a lane is given. Change it later with update_clip (text, style) and set_layout.', inputSchema: {
|
|
838
|
+
filmId, text: z.string(), preset: z.enum(['title', 'lowerThird', 'subtitle', 'callout', 'impact', 'cinematic', 'neon', 'neonPink', 'headline', 'label', 'yellowCaption', 'boxedCaption', 'bold', 'warning', 'quote', 'typewriter', 'minimal', 'credits']).optional().describe('A look: title, lower third, subtitle and callout, then impact, cinematic, neon, neonPink, headline, label, yellowCaption, boxedCaption, bold, warning, quote, typewriter, minimal, credits. Default title.'), at: at.optional(), length: length.optional(),
|
|
839
|
+
lane: z.string().optional().describe('A video lane above the film, by name or id'),
|
|
840
|
+
style: textStyle.optional(),
|
|
841
|
+
layout: place.optional(),
|
|
842
|
+
} },
|
|
843
|
+
wrap(({ filmId: id, ...rest }) => client.addText(id, rest)));
|
|
844
|
+
|
|
845
|
+
server.registerTool('make_subtitles',
|
|
846
|
+
{ title: 'Make subtitles', description: 'Make subtitles from the spoken lines of the film, timed to the take each clip shows, on a Subtitles row. Running it again refreshes the ones nobody edited and keeps ones edited by hand. Exports then also write a .srt.', inputSchema: { filmId } },
|
|
847
|
+
wrap(({ filmId: id }) => client.makeSubtitles(id)));
|
|
848
|
+
|
|
849
|
+
server.registerTool('add_image',
|
|
850
|
+
{ title: 'Add a picture', description: 'Put a picture (logo, screenshot, still) on a row above the film, placed anywhere on the frame. Pass an upload handle from upload_file, or the jobId of a finished picture.', inputSchema: {
|
|
851
|
+
filmId, upload: z.string().optional().describe('Handle from upload_file'), jobId: z.string().optional().describe('A finished picture from list_jobs'),
|
|
852
|
+
at: at.optional(), length: length.optional(), lane: z.string().optional(), layout: place.optional(),
|
|
853
|
+
} },
|
|
854
|
+
wrap(({ filmId: id, ...rest }) => client.addImage(id, rest)));
|
|
855
|
+
|
|
856
|
+
server.registerTool('set_layout',
|
|
857
|
+
{ title: 'Place on the frame', description: 'Move, resize, turn or fade any text, picture or clip on a row above the film. rotation is in degrees, clockwise. A caption moves with every caption. fullFrame: true makes a video clip cover the whole frame again.', inputSchema: {
|
|
858
|
+
filmId, clip: clipRef, x: num.optional(), y: num.optional(), size: num.optional(), opacity: num.optional(), rotation: num.optional().describe('Degrees, -180 to 180'), fullFrame: z.boolean().optional(),
|
|
859
|
+
} },
|
|
860
|
+
wrap(({ filmId: id, clip, ...rest }) => client.setLayout(id, clip, rest)));
|
|
861
|
+
|
|
862
|
+
server.registerTool('set_transition',
|
|
863
|
+
{ title: 'Set a transition', description: 'Blend into a clip on the film row from the clip before it, or none for a cut. mode overlap: the clip and every clip after it slide left by the transition so both clips play their own frames (items and sounds linked to those clips move along; a song on its own row does not). mode hold: nothing moves, the transition sits half before and half after the cut, and a clip without frames there holds its edge frame. Without mode, a new transition takes the film default (update_film_settings transitionMode) and an existing one keeps its own. Removing an overlap slides the clips back. allCuts: true puts it on every cut where two clips meet (no clip needed).', inputSchema: {
|
|
864
|
+
filmId, clip: clipRef.optional(), type: z.enum(['crossfade', 'black', 'white', 'wipeLeft', 'wipeRight', 'wipeUp', 'wipeDown', 'slideLeft', 'slideRight', 'slideUp', 'slideDown', 'coverLeft', 'coverRight', 'coverUp', 'coverDown', 'revealLeft', 'revealRight', 'revealUp', 'revealDown', 'circleOpen', 'circleClose', 'none']), seconds: num.optional().describe('Default 0.5'), allCuts: z.boolean().optional(),
|
|
865
|
+
mode: z.enum(['overlap', 'hold']).optional(),
|
|
866
|
+
} },
|
|
867
|
+
wrap(({ filmId: id, clip, ...rest }) => client.setTransition(id, clip, rest)));
|
|
868
|
+
|
|
869
|
+
server.registerTool('link_to_clip',
|
|
870
|
+
{ title: 'Link to a clip', description: 'Link text, a picture, a placed clip or a sound to a clip on the film row so it moves with that clip (when the clip is moved, and when an overlap transition slides it). clip null unlinks it. A clip\'s own lifted sound and the captions made from its lines already follow it.', inputSchema: {
|
|
871
|
+
filmId, item: z.string().describe('The item or sound, by name or id'), clip: clipRef.nullable().describe('The film-row clip, or null to unlink'),
|
|
872
|
+
} },
|
|
873
|
+
wrap(({ filmId: id, ...rest }) => client.linkToClip(id, rest)));
|
|
874
|
+
|
|
875
|
+
server.registerTool('set_animation',
|
|
876
|
+
{ title: 'Animate on the frame', description: 'Give text, a picture or a placed clip an In, Out or Loop animation, or kind null to take it off. A caption animates with every caption. In and Out take seconds, Loop takes speed (cycles per second).', inputSchema: {
|
|
877
|
+
filmId, clip: clipRef, slot: z.enum(['in', 'out', 'loop']),
|
|
878
|
+
kind: z.enum(['fade', 'slideLeft', 'slideRight', 'slideUp', 'slideDown', 'rise', 'pop', 'zoomIn', 'zoomOut', 'spin', 'drop', 'pulse', 'float', 'sway', 'breathe', 'blink']).nullable().describe('In and Out: fade, slideLeft, slideRight, slideUp, slideDown, rise, pop, zoomIn, zoomOut, spin, drop. Loop: pulse, float, sway, breathe, blink. null removes it.'),
|
|
879
|
+
seconds: num.optional(), speed: num.optional(),
|
|
880
|
+
} },
|
|
881
|
+
wrap(({ filmId: id, clip, ...rest }) => client.setAnimation(id, clip, rest)));
|
|
882
|
+
|
|
883
|
+
server.registerTool('split_caption',
|
|
884
|
+
{ title: 'Split a caption', description: 'Split a caption in two at a character of its text; the time is shared by how many characters each half has.', inputSchema: {
|
|
885
|
+
filmId, clip: clipRef, at: num.describe('A character position inside the text (1 to its length minus 1)'),
|
|
886
|
+
} },
|
|
887
|
+
wrap(({ filmId: id, clip, ...rest }) => client.splitCaption(id, clip, rest)));
|
|
888
|
+
|
|
889
|
+
server.registerTool('merge_caption',
|
|
890
|
+
{ title: 'Merge captions', description: 'Merge a caption with the next one on its row: one caption across both, both texts.', inputSchema: { filmId, clip: clipRef } },
|
|
891
|
+
wrap(({ filmId: id, clip }) => client.mergeCaption(id, clip)));
|
|
892
|
+
|
|
893
|
+
server.registerTool('import_srt',
|
|
894
|
+
{ title: 'Import captions', description: 'Captions from the text of an .srt file, timed from the start of the film. They replace the captions there, keeping the ones fixed by hand. The answer says how many were imported and skipped.', inputSchema: {
|
|
895
|
+
filmId, srt: z.string().describe('The whole .srt file as text'),
|
|
896
|
+
} },
|
|
897
|
+
wrap(({ filmId: id, srt }) => client.importSrt(id, { srt })));
|
|
898
|
+
|
|
899
|
+
server.registerTool('add_to_media',
|
|
900
|
+
{ title: 'Add to the project bin', description: 'Put a video, picture or audio file in the film\'s project bin without placing it on the timeline. Pass an upload handle from upload_file, or the jobId of a finished generation. get_film lists the bin.', inputSchema: {
|
|
901
|
+
filmId, upload: z.string().optional().describe('Handle from upload_file'), jobId: z.string().optional(), name: z.string().optional(),
|
|
902
|
+
} },
|
|
903
|
+
wrap(({ filmId: id, ...rest }) => client.addToMedia(id, rest)));
|
|
904
|
+
|
|
905
|
+
server.registerTool('remove_from_media',
|
|
906
|
+
{ title: 'Take out of the project bin', description: 'Take a file out of the project bin. Clips that use it stay on the timeline.', inputSchema: { filmId, mediaId: z.string() } },
|
|
907
|
+
wrap(({ filmId: id, mediaId }) => client.removeFromMedia(id, mediaId)));
|
|
908
|
+
|
|
730
909
|
server.registerTool('add_marker',
|
|
731
910
|
{ title: 'Add a marker', description: 'Put a named marker on the ruler.', inputSchema: { filmId, at, name: z.string().optional() } },
|
|
732
911
|
wrap(({ filmId: id, ...rest }) => client.addMarker(id, rest)));
|
|
@@ -786,7 +965,7 @@ export function registerTools(server, client, { now = Date.now, sleep = (ms) =>
|
|
|
786
965
|
wrap(() => client.listWardrobe()));
|
|
787
966
|
|
|
788
967
|
server.registerTool('create_outfit',
|
|
789
|
-
{ title: 'Create an outfit', description: 'Save an outfit to the Wardrobe. The description is what a character\'s look in this outfit is generated from, so describe every garment: its cut, colour, material and fit. image is optional: the upload_file handle of a picture of the clothes on their own. An outfit is not cast by itself: to put a character in it,
|
|
968
|
+
{ title: 'Create an outfit', description: 'Save an outfit to the Wardrobe. The description is what a character\'s look in this outfit is generated from, so describe every garment: its cut, colour, material and fit. image is optional: the upload_file handle of a picture of the clothes on their own. An outfit is not cast by itself: to put a character in it, make a look from it (create_look with this outfit\'s id), and the Video Studio casts the character in that look.', inputSchema: {
|
|
790
969
|
name: z.string().describe('Outfit name shown in the Wardrobe, e.g. "Navy suit"'),
|
|
791
970
|
description: z.string().describe('Every garment, its cut, colour, material and fit, e.g. "a navy two-piece wool suit, slim fit, white shirt, no tie, brown leather shoes"'),
|
|
792
971
|
category: z.string().optional().describe('e.g. formal | casual | sportswear'),
|