@simpligen/mcp 0.9.1 → 0.11.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 +2 -2
- package/package.json +1 -1
- package/src/client.js +3 -0
- package/src/tools.js +38 -11
package/README.md
CHANGED
|
@@ -22,11 +22,11 @@ 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 or
|
|
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.
|
|
26
26
|
|
|
27
27
|
**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
28
|
|
|
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`. 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`.
|
|
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`.
|
|
30
30
|
|
|
31
31
|
`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
32
|
|
package/package.json
CHANGED
package/src/client.js
CHANGED
|
@@ -161,6 +161,9 @@ export class ControlApiClient {
|
|
|
161
161
|
exportFilm(filmId) { return this.#longReq('POST', this.#film(filmId, '/export'), {}); }
|
|
162
162
|
listLocations() { return this.#req('GET', '/locations'); }
|
|
163
163
|
createLocation(args) { return this.#req('POST', '/locations', args); }
|
|
164
|
+
listWardrobe() { return this.#req('GET', '/wardrobe'); }
|
|
165
|
+
createOutfit(args) { return this.#req('POST', '/wardrobe', args); }
|
|
166
|
+
removeOutfit(id) { return this.#req('DELETE', `/wardrobe/${encodeURIComponent(id)}`); }
|
|
164
167
|
|
|
165
168
|
async uploadFile(filePath) {
|
|
166
169
|
let buf;
|
package/src/tools.js
CHANGED
|
@@ -21,6 +21,7 @@ export const TOOL_NAMES = [
|
|
|
21
21
|
'list_films', 'create_film', 'get_film', 'update_film_settings', 'add_track', 'move_track', 'detect_tempo',
|
|
22
22
|
'add_clip', 'import_clip', 'update_clip', 'move_clip', 'trim_clip', 'remove_clip', 'apply_film_plan', 'set_fades', 'add_marker',
|
|
23
23
|
'set_export_range', 'render_clips', 'wait_for_renders', 'list_takes', 'use_take', 'export_film', 'list_locations', 'create_location',
|
|
24
|
+
'list_wardrobe', 'create_outfit', 'remove_outfit',
|
|
24
25
|
];
|
|
25
26
|
|
|
26
27
|
// The tools that need the Video Studio. Always listed: without the studio each call answers
|
|
@@ -31,6 +32,10 @@ const ok = (data) => ({ content: [{ type: 'text', text: JSON.stringify(data, nul
|
|
|
31
32
|
const fail = (err) => ({ isError: true, content: [{ type: 'text', text: `${err.errorCode ? err.errorCode + ': ' : ''}${err.message || String(err)}` }] });
|
|
32
33
|
const wrap = (fn) => async (args) => { try { return ok(await fn(args)); } catch (e) { return fail(e); } };
|
|
33
34
|
|
|
35
|
+
// A project as generate and the film tools take it. The App resolves it with one lookup
|
|
36
|
+
// (agentApi/projectRef.js) and refuses one that matches nothing.
|
|
37
|
+
const projectArg = (what) => z.string().optional().describe(`${what}: its id, slug or exact name from list_projects, e.g. "Mature" when the user says "the Mature Gallery". Leave it out for the project open in the app. A value that matches no project is refused with unknown_project, which lists the projects.`);
|
|
38
|
+
|
|
34
39
|
// In the in-app Assistant the user approves spending and deletions on a card first.
|
|
35
40
|
const APPROVAL_NOTE = ' If the result is awaiting_approval, call wait_for_approval with its proposalId and tell the user an approval card is waiting.';
|
|
36
41
|
|
|
@@ -53,7 +58,7 @@ export function registerTools(server, client, { now = Date.now, sleep = (ms) =>
|
|
|
53
58
|
wrap(() => client.getCapabilities()));
|
|
54
59
|
|
|
55
60
|
server.registerTool('get_status',
|
|
56
|
-
{ title: 'Get status', description: 'Engine running state, whether cloud is connected, credit balance, and the active project.', inputSchema: {} },
|
|
61
|
+
{ title: 'Get status', description: 'Engine running state, whether cloud is connected, whether the user has Local only on (localOnly: then nothing may run in the cloud), credit balance, and the active project.', inputSchema: {} },
|
|
57
62
|
wrap(() => client.getStatus()));
|
|
58
63
|
|
|
59
64
|
// The engine's lifecycle. get_status could always report it was down and
|
|
@@ -74,11 +79,11 @@ export function registerTools(server, client, { now = Date.now, sleep = (ms) =>
|
|
|
74
79
|
wrap(() => client.restartEngine()));
|
|
75
80
|
|
|
76
81
|
server.registerTool('list_projects',
|
|
77
|
-
{ title: 'List projects', description: 'List projects (
|
|
82
|
+
{ title: 'List projects', description: 'List projects with their id, slug and name. A project is what the app shows in its Gallery: the user opens one with the switcher at the top of the left rail, and new results land in the open one. When the user asks for "the Mature Gallery", that is the project named Mature. generate (project) and the film tools (projectId) take its id, slug or exact name.', inputSchema: {} },
|
|
78
83
|
wrap(() => client.listProjects()));
|
|
79
84
|
|
|
80
85
|
server.registerTool('create_project',
|
|
81
|
-
{ title: 'Create project', description: 'Create a new project
|
|
86
|
+
{ title: 'Create project', description: 'Create a new project, which the app shows as a Gallery. Creating it does not open it in the app: pass it as the project of generate to save there.', inputSchema: { name: z.string().describe('Project name') } },
|
|
82
87
|
wrap(({ name }) => client.createProject(name)));
|
|
83
88
|
|
|
84
89
|
server.registerTool('upload_file',
|
|
@@ -87,12 +92,14 @@ export function registerTools(server, client, { now = Date.now, sleep = (ms) =>
|
|
|
87
92
|
|
|
88
93
|
server.registerTool('generate',
|
|
89
94
|
{
|
|
90
|
-
title: 'Generate', description: 'Start an image or video generation. Before writing the prompt, call get_prompt_guide for the preset and follow it. Inputs (image/referenceImages/video) are handles from upload_file. backend: local | cloud | auto. Returns a jobId (and, for local runs, an expectation with the same fields as onThisMachine for the requested settings); poll with wait_for_result or get_job.' + APPROVAL_NOTE,
|
|
95
|
+
title: 'Generate', description: 'Start an image or video generation. Before writing the prompt, call get_prompt_guide for the preset and follow it. Inputs (image/referenceImages/video) are handles from upload_file. backend: local | cloud | auto. auto runs locally on any PC with a local engine; if the preset is not installed you get preset_not_installed (call prepare_preset, or ask the user before choosing cloud, which costs credits). cloud is refused with cloud_disabled while the user has Local only on (get_status reports localOnly). The result is saved to the project (Gallery) named in project, else to the project open in the app. Returns a jobId (and, for local runs, an expectation with the same fields as onThisMachine for the requested settings); poll with wait_for_result or get_job.' + APPROVAL_NOTE,
|
|
91
96
|
inputSchema: {
|
|
92
97
|
presetId: z.string(), mediaType: z.enum(['image', 'video']), prompt: z.string(),
|
|
93
98
|
packId: z.string().optional(), backend: z.enum(['local', 'cloud', 'auto']).optional(),
|
|
94
99
|
negativePrompt: z.string().optional().describe('Extra terms added to the preset default negative prompt (local runs only); the default is always applied.'),
|
|
95
|
-
|
|
100
|
+
// Undescribed, agents never set it: Goose saved a "Mature Gallery" request into
|
|
101
|
+
// whichever project was open (Melvyl, 2026-11-21).
|
|
102
|
+
project: projectArg('The project (Gallery) to save the result to'),
|
|
96
103
|
image: z.string().optional().describe('upload_file handle'),
|
|
97
104
|
// A bare handle still works, so every agent written against the old
|
|
98
105
|
// schema keeps working. The object form carries the per-image label,
|
|
@@ -257,12 +264,13 @@ export function registerTools(server, client, { now = Date.now, sleep = (ms) =>
|
|
|
257
264
|
{ title: 'Fill the Generate form', description: 'Fill in the Generate screen for the user (preset, prompt and settings) without generating, so they can review it and click Generate themselves.', inputSchema: {
|
|
258
265
|
presetId: z.string(), prompt: z.string(), negativePrompt: z.string().optional(), characterId: z.string().optional(),
|
|
259
266
|
settings: z.record(z.any()).optional().describe('Preset settings keyed by setting id (see list_capabilities).'),
|
|
267
|
+
keepForm: z.boolean().optional().describe('Replace only the prompt of the preset already on screen and keep everything else the user set (references, characters, other fields). Use it when improving or editing the prompt on screen.'),
|
|
260
268
|
} },
|
|
261
269
|
wrap((a) => client.fillGenerateForm(a)));
|
|
262
270
|
|
|
263
271
|
server.registerTool('open_screen',
|
|
264
|
-
{ title: 'Open a screen', description: 'Take the user to a screen in SimpliGen. id selects a character when screen is "character".', inputSchema: {
|
|
265
|
-
screen: z.enum(['generate', 'gallery', 'characters', 'character', 'video-studio', 'prompt-library', 'settings']),
|
|
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']),
|
|
266
274
|
id: z.string().optional(),
|
|
267
275
|
} },
|
|
268
276
|
wrap((a) => client.openScreen(a)));
|
|
@@ -545,7 +553,7 @@ export function registerTools(server, client, { now = Date.now, sleep = (ms) =>
|
|
|
545
553
|
inputSchema: {
|
|
546
554
|
id: z.string().describe('Recipe id from list_recipes'),
|
|
547
555
|
inputs: z.record(z.any()).describe('Input values keyed by the recipe\'s input keys (see list_recipes -> inputs).'),
|
|
548
|
-
engine: z.enum(['local', 'cloud', 'auto']).optional().describe('Where the steps render. auto = local
|
|
556
|
+
engine: z.enum(['local', 'cloud', 'auto']).optional().describe('Where the steps render. auto = local; it uses the cloud only on a PC with no local engine. cloud costs credits and is refused while the user has Local only on.'),
|
|
549
557
|
},
|
|
550
558
|
},
|
|
551
559
|
wrap(({ id, inputs, engine }) => client.runRecipe(id, { inputs: inputs || {}, ...(engine ? { engine } : {}) })));
|
|
@@ -574,7 +582,7 @@ export function registerTools(server, client, { now = Date.now, sleep = (ms) =>
|
|
|
574
582
|
// --- Products + subjects: what a recipe's `subject` inputs take ---
|
|
575
583
|
|
|
576
584
|
server.registerTool('list_subjects',
|
|
577
|
-
{ title: 'List subjects', description: 'Every
|
|
585
|
+
{ title: 'List subjects', description: 'Every saved subject (id, type, name): characters, products, locations and outfits (type "wardrobe"). A recipe\'s `subject` input takes a character (list_characters) or a product (list_products / create_product); locations and outfits are for the Video Studio (list_locations, list_wardrobe).', inputSchema: {} },
|
|
578
586
|
wrap(() => client.listSubjects()));
|
|
579
587
|
|
|
580
588
|
server.registerTool('list_products',
|
|
@@ -626,12 +634,12 @@ export function registerTools(server, client, { now = Date.now, sleep = (ms) =>
|
|
|
626
634
|
const people = z.array(z.string()).describe('Characters by name or id (make them with create_character). As many as the preset holds: eight on MiniMax H3, up to four on the LTX cast presets. A cast too big for its preset moves the clip to an installed preset that holds it; only a cast no installed preset holds is refused.');
|
|
627
635
|
|
|
628
636
|
server.registerTool('list_films',
|
|
629
|
-
{ title: 'List films', description: 'The Video Studio films of a project (default: the current one): id, title, number of clips. The film tools need the Video Studio in SimpliGen; without it they answer studio_not_installed.', inputSchema: { projectId:
|
|
637
|
+
{ title: 'List films', description: 'The Video Studio films of a project (default: the current one): id, title, number of clips. The film tools need the Video Studio in SimpliGen; without it they answer studio_not_installed.', inputSchema: { projectId: projectArg('The project (Gallery) whose films to list') } },
|
|
630
638
|
wrap(({ projectId }) => client.listFilms(projectId)));
|
|
631
639
|
|
|
632
640
|
server.registerTool('create_film',
|
|
633
641
|
{ title: 'Create a film', description: 'Create an empty Video Studio film and answer its timeline. Shape 16:9, 9:16 or 1:1; resolution 480p, 720p or 1080p; renders on this PC (local) or in the cloud. Presets per kind of shot default to the studio\'s own choice.', inputSchema: {
|
|
634
|
-
name: z.string(), projectId:
|
|
642
|
+
name: z.string(), projectId: projectArg('The project (Gallery) the film belongs to'),
|
|
635
643
|
aspect: z.enum(['16:9', '9:16', '1:1']).optional(), quality: z.enum(['480p', '720p', '1080p']).optional(),
|
|
636
644
|
renderOn: z.enum(['local', 'cloud']).optional(),
|
|
637
645
|
presets: z.object({ t2v: z.string().optional(), i2v: z.string().optional(), r2v: z.string().optional() }).optional().describe('Film presets per kind of shot (pack:preset ids from list_capabilities).'),
|
|
@@ -770,6 +778,25 @@ export function registerTools(server, client, { now = Date.now, sleep = (ms) =>
|
|
|
770
778
|
} },
|
|
771
779
|
wrap((a) => client.createLocation(a)));
|
|
772
780
|
|
|
781
|
+
// An outfit is not cast by itself: a character is dressed in it through a look, made on
|
|
782
|
+
// the character's Looks page, and the Video Studio casts the character in that look.
|
|
783
|
+
server.registerTool('list_wardrobe',
|
|
784
|
+
{ title: 'List the wardrobe', description: 'The Library\'s outfits (the Wardrobe): id, name, description, category, whether it has a garment picture.', inputSchema: {} },
|
|
785
|
+
wrap(() => client.listWardrobe()));
|
|
786
|
+
|
|
787
|
+
server.registerTool('create_outfit',
|
|
788
|
+
{ 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, the user makes a look from it on the character\'s Looks page (open_screen "character" with the character\'s id), and the Video Studio casts the character in that look.', inputSchema: {
|
|
789
|
+
name: z.string().describe('Outfit name shown in the Wardrobe, e.g. "Navy suit"'),
|
|
790
|
+
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"'),
|
|
791
|
+
category: z.string().optional().describe('e.g. formal | casual | sportswear'),
|
|
792
|
+
image: z.string().optional().describe('upload_file handle of a garment picture (the clothes on their own, no person)'),
|
|
793
|
+
} },
|
|
794
|
+
wrap((a) => client.createOutfit(a)));
|
|
795
|
+
|
|
796
|
+
server.registerTool('remove_outfit',
|
|
797
|
+
{ title: 'Remove an outfit', description: 'Delete an outfit and its garment picture from the Wardrobe. Looks already made from it keep their pictures but lose its words, so a film that casts one of them sends less about the clothes.' + APPROVAL_NOTE, inputSchema: { id: z.string() } },
|
|
798
|
+
wrap(({ id }) => client.removeOutfit(id)));
|
|
799
|
+
|
|
773
800
|
server.registerTool('cancel_recipe_run',
|
|
774
801
|
{ title: 'Cancel a recipe run', description: 'Stop a running recipe: no further steps start; a local in-flight step is interrupted (a cloud step already running finishes server-side and is saved).', inputSchema: { runId: z.string() } },
|
|
775
802
|
wrap(({ runId }) => client.cancelRecipeRun(runId)));
|