@simpligen/mcp 0.10.0 → 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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/tools.js +15 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simpligen/mcp",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "MCP server for SimpliGen -- drive local/cloud AI image & video generation from an agent.",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/tools.js CHANGED
@@ -32,6 +32,10 @@ const ok = (data) => ({ content: [{ type: 'text', text: JSON.stringify(data, nul
32
32
  const fail = (err) => ({ isError: true, content: [{ type: 'text', text: `${err.errorCode ? err.errorCode + ': ' : ''}${err.message || String(err)}` }] });
33
33
  const wrap = (fn) => async (args) => { try { return ok(await fn(args)); } catch (e) { return fail(e); } };
34
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
+
35
39
  // In the in-app Assistant the user approves spending and deletions on a card first.
36
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.';
37
41
 
@@ -54,7 +58,7 @@ export function registerTools(server, client, { now = Date.now, sleep = (ms) =>
54
58
  wrap(() => client.getCapabilities()));
55
59
 
56
60
  server.registerTool('get_status',
57
- { 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: {} },
58
62
  wrap(() => client.getStatus()));
59
63
 
60
64
  // The engine's lifecycle. get_status could always report it was down and
@@ -75,11 +79,11 @@ export function registerTools(server, client, { now = Date.now, sleep = (ms) =>
75
79
  wrap(() => client.restartEngine()));
76
80
 
77
81
  server.registerTool('list_projects',
78
- { title: 'List projects', description: 'List projects (output containers).', inputSchema: {} },
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: {} },
79
83
  wrap(() => client.listProjects()));
80
84
 
81
85
  server.registerTool('create_project',
82
- { title: 'Create project', description: 'Create a new project (output container).', inputSchema: { name: z.string().describe('Project name') } },
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') } },
83
87
  wrap(({ name }) => client.createProject(name)));
84
88
 
85
89
  server.registerTool('upload_file',
@@ -88,12 +92,14 @@ export function registerTools(server, client, { now = Date.now, sleep = (ms) =>
88
92
 
89
93
  server.registerTool('generate',
90
94
  {
91
- 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,
92
96
  inputSchema: {
93
97
  presetId: z.string(), mediaType: z.enum(['image', 'video']), prompt: z.string(),
94
98
  packId: z.string().optional(), backend: z.enum(['local', 'cloud', 'auto']).optional(),
95
99
  negativePrompt: z.string().optional().describe('Extra terms added to the preset default negative prompt (local runs only); the default is always applied.'),
96
- project: z.string().optional(),
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'),
97
103
  image: z.string().optional().describe('upload_file handle'),
98
104
  // A bare handle still works, so every agent written against the old
99
105
  // schema keeps working. The object form carries the per-image label,
@@ -258,6 +264,7 @@ export function registerTools(server, client, { now = Date.now, sleep = (ms) =>
258
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: {
259
265
  presetId: z.string(), prompt: z.string(), negativePrompt: z.string().optional(), characterId: z.string().optional(),
260
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.'),
261
268
  } },
262
269
  wrap((a) => client.fillGenerateForm(a)));
263
270
 
@@ -546,7 +553,7 @@ export function registerTools(server, client, { now = Date.now, sleep = (ms) =>
546
553
  inputSchema: {
547
554
  id: z.string().describe('Recipe id from list_recipes'),
548
555
  inputs: z.record(z.any()).describe('Input values keyed by the recipe\'s input keys (see list_recipes -> inputs).'),
549
- engine: z.enum(['local', 'cloud', 'auto']).optional().describe('Where the steps render. auto = local if every step is installed, else cloud when connected.'),
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.'),
550
557
  },
551
558
  },
552
559
  wrap(({ id, inputs, engine }) => client.runRecipe(id, { inputs: inputs || {}, ...(engine ? { engine } : {}) })));
@@ -627,12 +634,12 @@ export function registerTools(server, client, { now = Date.now, sleep = (ms) =>
627
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.');
628
635
 
629
636
  server.registerTool('list_films',
630
- { 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: z.string().optional() } },
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') } },
631
638
  wrap(({ projectId }) => client.listFilms(projectId)));
632
639
 
633
640
  server.registerTool('create_film',
634
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: {
635
- name: z.string(), projectId: z.string().optional(),
642
+ name: z.string(), projectId: projectArg('The project (Gallery) the film belongs to'),
636
643
  aspect: z.enum(['16:9', '9:16', '1:1']).optional(), quality: z.enum(['480p', '720p', '1080p']).optional(),
637
644
  renderOn: z.enum(['local', 'cloud']).optional(),
638
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).'),