@marlinjai/studio-mcp 0.12.0 → 0.13.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 CHANGED
@@ -84,7 +84,7 @@ The token is held in memory only. It is never logged, never serialized into a re
84
84
  | Tool | What it does |
85
85
  |---|---|
86
86
  | `studio_list_projects` | List projects (id, slug, name). A `projectId` is needed by the workflow-based tools and optional on `studio_generate_image` and `studio_generate_3d`. |
87
- | `studio_generate_image` | Submit an image generation, wait for it, return the signed URL and cost. Only `prompt` is required: `brandSlug` (a brand of the key's company) applies that brand's style and references, and leaving it out generates without a brand; `characterSlug` pins a character; `projectId` chooses the project the image is filed in. A `brandSlug` or `characterSlug` the company cannot use is refused with `404` `input_not_found` before anything is spent. The result carries `candidates: { requested, rendered, mayRender? }` and, when the model renders fewer images than `candidateCount` asked for, a `notice`. `wait=false` returns the `jobId`. |
87
+ | `studio_generate_image` | Submit an image generation, wait for it, return the signed URL and cost. Only `prompt` is required: `brandSlug` (a brand of the key's company) applies that brand's style and references, and leaving it out generates without a brand; `characterSlug` pins a character; `mentions` (0.13.0) puts several characters, products and locations of the company in one image, in prompt order (`[{ kind, id: slug }]`, at most 10; more references than the model takes is a `400` `too_many_references`, one without a reference image a `422` `mention_without_reference`); `projectId` chooses the project the image is filed in. A `brandSlug`, `characterSlug` or mention the company cannot use is refused with `404` `input_not_found` before anything is spent. The result carries `candidates: { requested, rendered, mayRender? }` and, when the model renders fewer images than `candidateCount` asked for, a `notice`. `wait=false` returns the `jobId`. |
88
88
  | `studio_generate_3d` | Generate one 3D model (a textured GLB mesh) from a prompt or one image through 3D AI Studio, wait for it, return the signed GLB URL and cost (the price follows the model and the quality flags). Refuses a model and image mismatch before submitting. `wait=false` returns the `jobId`. |
89
89
  | `studio_rig_3d` | Rig a humanoid Model3D and apply up to 10 Meshy animation presets (by name or id) through a one-node workflow; returns the rigged GLB, each clip's name and url, and the cost ($0.20 per rig plus $0.12 per preset). Refuses an unknown preset, with close matches, before submitting. |
90
90
  | `studio_find_animations` | Search Meshy's 678-preset animation library by words. Local, free, no request. |
package/dist/cli.js CHANGED
@@ -202,7 +202,9 @@ var StudioClient = class {
202
202
  * use is refused with 404 `input_not_found` before anything is spent (since
203
203
  * 2026-10-11; it used to generate without the brand). `projectId` chooses the
204
204
  * project; without it the job lands in the project named after the brand, or
205
- * in `default`.
205
+ * in `default`. `mentions` (since 2026-10-25) puts several characters,
206
+ * products and locations in one image, in prompt order, each by its slug;
207
+ * more references than the model takes is a 400 `too_many_references`.
206
208
  */
207
209
  generate(body) {
208
210
  return this.json("POST", "/api/generate", { json: body });
@@ -734,7 +736,10 @@ var CATALOG_ENTRIES = [
734
736
  task: "text-to-image",
735
737
  label: "Imagen 4 Fast (KIE)",
736
738
  description: "Google Imagen 4 Fast via KIE. No IP indemnity.",
737
- capabilities: { resolutions: [] }
739
+ // Text only: KIE's imagen4-fast input has no image field, so the adapter
740
+ // (buildKieInput) sends none. Declared, so a reference is refused before
741
+ // spend instead of being dropped after it.
742
+ capabilities: { resolutions: [], maxInputImages: 0 }
738
743
  },
739
744
  {
740
745
  id: "kie/seedream-v4",
@@ -742,7 +747,9 @@ var CATALOG_ENTRIES = [
742
747
  modality: "image",
743
748
  task: "text-to-image",
744
749
  label: "Seedream V4 (KIE)",
745
- description: "ByteDance Seedream V4 via KIE. Stylized output not available on Vertex. No IP indemnity."
750
+ description: "ByteDance Seedream V4 via KIE. Stylized output not available on Vertex. No IP indemnity.",
751
+ // Text only, like imagen-4-fast: the seedream-v4 text-to-image input has no image field.
752
+ capabilities: { maxInputImages: 0 }
746
753
  },
747
754
  // ── KIE.ai: newer image models, the cheaper route (price feed 2026-09-23) ─
748
755
  {
@@ -3388,7 +3395,10 @@ var CATALOG_ENTRIES2 = [
3388
3395
  task: "text-to-image",
3389
3396
  label: "Imagen 4 Fast (KIE)",
3390
3397
  description: "Google Imagen 4 Fast via KIE. No IP indemnity.",
3391
- capabilities: { resolutions: [] }
3398
+ // Text only: KIE's imagen4-fast input has no image field, so the adapter
3399
+ // (buildKieInput) sends none. Declared, so a reference is refused before
3400
+ // spend instead of being dropped after it.
3401
+ capabilities: { resolutions: [], maxInputImages: 0 }
3392
3402
  },
3393
3403
  {
3394
3404
  id: "kie/seedream-v4",
@@ -3396,7 +3406,9 @@ var CATALOG_ENTRIES2 = [
3396
3406
  modality: "image",
3397
3407
  task: "text-to-image",
3398
3408
  label: "Seedream V4 (KIE)",
3399
- description: "ByteDance Seedream V4 via KIE. Stylized output not available on Vertex. No IP indemnity."
3409
+ description: "ByteDance Seedream V4 via KIE. Stylized output not available on Vertex. No IP indemnity.",
3410
+ // Text only, like imagen-4-fast: the seedream-v4 text-to-image input has no image field.
3411
+ capabilities: { maxInputImages: 0 }
3400
3412
  },
3401
3413
  // ── KIE.ai: newer image models, the cheaper route (price feed 2026-09-23) ─
3402
3414
  {
@@ -6905,7 +6917,7 @@ var studioListProjects = defineTool({
6905
6917
  });
6906
6918
  var studioGenerateImage = defineTool({
6907
6919
  name: "studio_generate_image",
6908
- description: "Generate an image from a prompt. A brand is optional: pass brandSlug to have the Studio apply that brand's style prefix and reference images server-side, or leave it out for an image without a brand. Optionally pin a character (characterSlug) so its identity references are injected too. A brandSlug or characterSlug that names nothing your company can use is refused before anything is spent (404, code input_not_found), and the error text says what to do next: act on it or relay it as written. The image is filed in projectId when given, otherwise in the project named after the brand (created on first use), otherwise in the project \"default\". Submits a job and, when wait=true (default), polls until it finishes and returns the signed image URL and costUsd (what the job cost your company: for a company on prepaid credits, what left its balance). With wait=false it returns the jobId immediately for studio_get_job. candidateCount asks for up to four candidates, but some models render one image regardless of the count: the result carries `candidates: { requested, rendered, mayRender? }`, and a `notice` to pass on to the user whenever fewer images will be made than were asked for. A typical image costs about $0.06 on prepaid credits without a subscription; the job's costUsd is the exact amount.",
6920
+ description: "Generate an image from a prompt. A brand is optional: pass brandSlug to have the Studio apply that brand's style prefix and reference images server-side, or leave it out for an image without a brand. Optionally pin a character (characterSlug) so its identity references are injected too, or put several characters, products and locations of your company in one image with mentions (in prompt order). A brandSlug, characterSlug or mention that names nothing your company can use is refused before anything is spent (404, code input_not_found), and the error text says what to do next: act on it or relay it as written. The image is filed in projectId when given, otherwise in the project named after the brand (created on first use), otherwise in the project \"default\". Submits a job and, when wait=true (default), polls until it finishes and returns the signed image URL and costUsd (what the job cost your company: for a company on prepaid credits, what left its balance). With wait=false it returns the jobId immediately for studio_get_job. candidateCount asks for up to four candidates, but some models render one image regardless of the count: the result carries `candidates: { requested, rendered, mayRender? }`, and a `notice` to pass on to the user whenever fewer images will be made than were asked for. A typical image costs about $0.06 on prepaid credits without a subscription; the job's costUsd is the exact amount.",
6909
6921
  inputSchema: {
6910
6922
  brandSlug: slug.optional().describe(
6911
6923
  "Optional. The slug of a brand of your company (create one with studio_create_brand). Omit it to generate without a brand. A slug that names no brand of your company is refused with 404 input_not_found; it is never used as a project name."
@@ -6913,7 +6925,15 @@ var studioGenerateImage = defineTool({
6913
6925
  brandMode: z11.string().optional().describe('Optional brand mode (e.g. "illustration"); modes are defined per brand. Only meaningful with brandSlug.'),
6914
6926
  prompt: z11.string().min(1).describe("What to generate. With brandSlug, the brand style prefix is prepended server-side."),
6915
6927
  characterSlug: slug.optional().describe(
6916
- "Optional character whose identity references are injected: one of your company's, or one another company shared (see studio_list_characters). A slug your company cannot use is refused with 404 input_not_found."
6928
+ "Optional character whose identity references are injected: one of your company's, or one another company shared (see studio_list_characters). A slug your company cannot use is refused with 404 input_not_found. To put several characters, products or locations in one image, use mentions instead."
6929
+ ),
6930
+ mentions: z11.array(
6931
+ z11.object({
6932
+ kind: z11.enum(["character", "product", "location"]).describe("What the mention names."),
6933
+ id: slug.describe("The slug of the character (studio_list_characters), product or location (GET /api/products, GET /api/locations).")
6934
+ })
6935
+ ).min(1).max(10).optional().describe(
6936
+ "Optional: the characters, products and locations of your company to put in the image, in the order the prompt names them (at most 10). Each one's reference images are sent in that order and the Studio tells the model which image is which, so name them in the prompt by their names (or as tokens such as @[character:ana], which the Studio replaces with the name). The model must take a reference image for each mention plus any attached image: an edit model such as fal/nano-banana-2-edit takes 8, and so does the default when no model is named (with mentions and a candidateCount above 1 the default is fal/nano-banana-2-edit, which renders up to 4); a text-only model takes none. Too many is refused with 400 too_many_references, a model that cannot take references with 400 model_takes_no_references, both before anything is spent. A mention your company cannot use is refused with 404 input_not_found, one without a reference image with 422 mention_without_reference. Sent together with characterSlug, that character comes first."
6917
6937
  ),
6918
6938
  projectId: z11.string().min(1).optional().describe(
6919
6939
  'Optional project to file the image under (an id from studio_list_projects; it must be a project of your company, anything else is a 404). Omit it to use the project named after brandSlug, or "default" when there is no brand.'
@@ -6940,6 +6960,7 @@ var studioGenerateImage = defineTool({
6940
6960
  ...args.brandMode ? { brandMode: args.brandMode } : {},
6941
6961
  prompt: args.prompt,
6942
6962
  ...args.characterSlug ? { characterSlug: args.characterSlug } : {},
6963
+ ...args.mentions && args.mentions.length > 0 ? { mentions: args.mentions } : {},
6943
6964
  ...args.projectId ? { projectId: args.projectId } : {},
6944
6965
  ...Object.keys(settings).length > 0 ? { settings } : {}
6945
6966
  });
@@ -7612,7 +7633,7 @@ function registerTools(server, base) {
7612
7633
 
7613
7634
  // src/server.ts
7614
7635
  var SERVER_NAME = "lumitra-studio";
7615
- var SERVER_VERSION = "0.12.0";
7636
+ var SERVER_VERSION = "0.13.0";
7616
7637
  function createStudioMcpServer(opts = {}) {
7617
7638
  const config = opts.config ?? resolveConfig(opts.env ?? process.env);
7618
7639
  const client = new StudioClient(config, {
package/dist/index.d.ts CHANGED
@@ -1680,13 +1680,19 @@ declare class StudioClient {
1680
1680
  * use is refused with 404 `input_not_found` before anything is spent (since
1681
1681
  * 2026-10-11; it used to generate without the brand). `projectId` chooses the
1682
1682
  * project; without it the job lands in the project named after the brand, or
1683
- * in `default`.
1683
+ * in `default`. `mentions` (since 2026-10-25) puts several characters,
1684
+ * products and locations in one image, in prompt order, each by its slug;
1685
+ * more references than the model takes is a 400 `too_many_references`.
1684
1686
  */
1685
1687
  generate(body: {
1686
1688
  brandSlug?: string;
1687
1689
  brandMode?: string;
1688
1690
  prompt: string;
1689
1691
  characterSlug?: string;
1692
+ mentions?: Array<{
1693
+ kind: 'character' | 'product' | 'location';
1694
+ id: string;
1695
+ }>;
1690
1696
  projectId?: string;
1691
1697
  settings?: Record<string, unknown>;
1692
1698
  }): Promise<GenerateImageResponse>;
@@ -2080,7 +2086,7 @@ declare function registerTools(server: McpServer, base: ToolContext): void;
2080
2086
  */
2081
2087
 
2082
2088
  declare const SERVER_NAME = "lumitra-studio";
2083
- declare const SERVER_VERSION = "0.12.0";
2089
+ declare const SERVER_VERSION = "0.13.0";
2084
2090
  interface CreateServerOptions {
2085
2091
  config?: StudioConfig;
2086
2092
  env?: NodeJS.ProcessEnv;
package/dist/index.js CHANGED
@@ -149,7 +149,9 @@ var StudioClient = class {
149
149
  * use is refused with 404 `input_not_found` before anything is spent (since
150
150
  * 2026-10-11; it used to generate without the brand). `projectId` chooses the
151
151
  * project; without it the job lands in the project named after the brand, or
152
- * in `default`.
152
+ * in `default`. `mentions` (since 2026-10-25) puts several characters,
153
+ * products and locations in one image, in prompt order, each by its slug;
154
+ * more references than the model takes is a 400 `too_many_references`.
153
155
  */
154
156
  generate(body) {
155
157
  return this.json("POST", "/api/generate", { json: body });
@@ -726,7 +728,10 @@ var CATALOG_ENTRIES = [
726
728
  task: "text-to-image",
727
729
  label: "Imagen 4 Fast (KIE)",
728
730
  description: "Google Imagen 4 Fast via KIE. No IP indemnity.",
729
- capabilities: { resolutions: [] }
731
+ // Text only: KIE's imagen4-fast input has no image field, so the adapter
732
+ // (buildKieInput) sends none. Declared, so a reference is refused before
733
+ // spend instead of being dropped after it.
734
+ capabilities: { resolutions: [], maxInputImages: 0 }
730
735
  },
731
736
  {
732
737
  id: "kie/seedream-v4",
@@ -734,7 +739,9 @@ var CATALOG_ENTRIES = [
734
739
  modality: "image",
735
740
  task: "text-to-image",
736
741
  label: "Seedream V4 (KIE)",
737
- description: "ByteDance Seedream V4 via KIE. Stylized output not available on Vertex. No IP indemnity."
742
+ description: "ByteDance Seedream V4 via KIE. Stylized output not available on Vertex. No IP indemnity.",
743
+ // Text only, like imagen-4-fast: the seedream-v4 text-to-image input has no image field.
744
+ capabilities: { maxInputImages: 0 }
738
745
  },
739
746
  // ── KIE.ai: newer image models, the cheaper route (price feed 2026-09-23) ─
740
747
  {
@@ -3380,7 +3387,10 @@ var CATALOG_ENTRIES2 = [
3380
3387
  task: "text-to-image",
3381
3388
  label: "Imagen 4 Fast (KIE)",
3382
3389
  description: "Google Imagen 4 Fast via KIE. No IP indemnity.",
3383
- capabilities: { resolutions: [] }
3390
+ // Text only: KIE's imagen4-fast input has no image field, so the adapter
3391
+ // (buildKieInput) sends none. Declared, so a reference is refused before
3392
+ // spend instead of being dropped after it.
3393
+ capabilities: { resolutions: [], maxInputImages: 0 }
3384
3394
  },
3385
3395
  {
3386
3396
  id: "kie/seedream-v4",
@@ -3388,7 +3398,9 @@ var CATALOG_ENTRIES2 = [
3388
3398
  modality: "image",
3389
3399
  task: "text-to-image",
3390
3400
  label: "Seedream V4 (KIE)",
3391
- description: "ByteDance Seedream V4 via KIE. Stylized output not available on Vertex. No IP indemnity."
3401
+ description: "ByteDance Seedream V4 via KIE. Stylized output not available on Vertex. No IP indemnity.",
3402
+ // Text only, like imagen-4-fast: the seedream-v4 text-to-image input has no image field.
3403
+ capabilities: { maxInputImages: 0 }
3392
3404
  },
3393
3405
  // ── KIE.ai: newer image models, the cheaper route (price feed 2026-09-23) ─
3394
3406
  {
@@ -6900,7 +6912,7 @@ var studioListProjects = defineTool({
6900
6912
  });
6901
6913
  var studioGenerateImage = defineTool({
6902
6914
  name: "studio_generate_image",
6903
- description: "Generate an image from a prompt. A brand is optional: pass brandSlug to have the Studio apply that brand's style prefix and reference images server-side, or leave it out for an image without a brand. Optionally pin a character (characterSlug) so its identity references are injected too. A brandSlug or characterSlug that names nothing your company can use is refused before anything is spent (404, code input_not_found), and the error text says what to do next: act on it or relay it as written. The image is filed in projectId when given, otherwise in the project named after the brand (created on first use), otherwise in the project \"default\". Submits a job and, when wait=true (default), polls until it finishes and returns the signed image URL and costUsd (what the job cost your company: for a company on prepaid credits, what left its balance). With wait=false it returns the jobId immediately for studio_get_job. candidateCount asks for up to four candidates, but some models render one image regardless of the count: the result carries `candidates: { requested, rendered, mayRender? }`, and a `notice` to pass on to the user whenever fewer images will be made than were asked for. A typical image costs about $0.06 on prepaid credits without a subscription; the job's costUsd is the exact amount.",
6915
+ description: "Generate an image from a prompt. A brand is optional: pass brandSlug to have the Studio apply that brand's style prefix and reference images server-side, or leave it out for an image without a brand. Optionally pin a character (characterSlug) so its identity references are injected too, or put several characters, products and locations of your company in one image with mentions (in prompt order). A brandSlug, characterSlug or mention that names nothing your company can use is refused before anything is spent (404, code input_not_found), and the error text says what to do next: act on it or relay it as written. The image is filed in projectId when given, otherwise in the project named after the brand (created on first use), otherwise in the project \"default\". Submits a job and, when wait=true (default), polls until it finishes and returns the signed image URL and costUsd (what the job cost your company: for a company on prepaid credits, what left its balance). With wait=false it returns the jobId immediately for studio_get_job. candidateCount asks for up to four candidates, but some models render one image regardless of the count: the result carries `candidates: { requested, rendered, mayRender? }`, and a `notice` to pass on to the user whenever fewer images will be made than were asked for. A typical image costs about $0.06 on prepaid credits without a subscription; the job's costUsd is the exact amount.",
6904
6916
  inputSchema: {
6905
6917
  brandSlug: slug.optional().describe(
6906
6918
  "Optional. The slug of a brand of your company (create one with studio_create_brand). Omit it to generate without a brand. A slug that names no brand of your company is refused with 404 input_not_found; it is never used as a project name."
@@ -6908,7 +6920,15 @@ var studioGenerateImage = defineTool({
6908
6920
  brandMode: z11.string().optional().describe('Optional brand mode (e.g. "illustration"); modes are defined per brand. Only meaningful with brandSlug.'),
6909
6921
  prompt: z11.string().min(1).describe("What to generate. With brandSlug, the brand style prefix is prepended server-side."),
6910
6922
  characterSlug: slug.optional().describe(
6911
- "Optional character whose identity references are injected: one of your company's, or one another company shared (see studio_list_characters). A slug your company cannot use is refused with 404 input_not_found."
6923
+ "Optional character whose identity references are injected: one of your company's, or one another company shared (see studio_list_characters). A slug your company cannot use is refused with 404 input_not_found. To put several characters, products or locations in one image, use mentions instead."
6924
+ ),
6925
+ mentions: z11.array(
6926
+ z11.object({
6927
+ kind: z11.enum(["character", "product", "location"]).describe("What the mention names."),
6928
+ id: slug.describe("The slug of the character (studio_list_characters), product or location (GET /api/products, GET /api/locations).")
6929
+ })
6930
+ ).min(1).max(10).optional().describe(
6931
+ "Optional: the characters, products and locations of your company to put in the image, in the order the prompt names them (at most 10). Each one's reference images are sent in that order and the Studio tells the model which image is which, so name them in the prompt by their names (or as tokens such as @[character:ana], which the Studio replaces with the name). The model must take a reference image for each mention plus any attached image: an edit model such as fal/nano-banana-2-edit takes 8, and so does the default when no model is named (with mentions and a candidateCount above 1 the default is fal/nano-banana-2-edit, which renders up to 4); a text-only model takes none. Too many is refused with 400 too_many_references, a model that cannot take references with 400 model_takes_no_references, both before anything is spent. A mention your company cannot use is refused with 404 input_not_found, one without a reference image with 422 mention_without_reference. Sent together with characterSlug, that character comes first."
6912
6932
  ),
6913
6933
  projectId: z11.string().min(1).optional().describe(
6914
6934
  'Optional project to file the image under (an id from studio_list_projects; it must be a project of your company, anything else is a 404). Omit it to use the project named after brandSlug, or "default" when there is no brand.'
@@ -6935,6 +6955,7 @@ var studioGenerateImage = defineTool({
6935
6955
  ...args.brandMode ? { brandMode: args.brandMode } : {},
6936
6956
  prompt: args.prompt,
6937
6957
  ...args.characterSlug ? { characterSlug: args.characterSlug } : {},
6958
+ ...args.mentions && args.mentions.length > 0 ? { mentions: args.mentions } : {},
6938
6959
  ...args.projectId ? { projectId: args.projectId } : {},
6939
6960
  ...Object.keys(settings).length > 0 ? { settings } : {}
6940
6961
  });
@@ -7607,7 +7628,7 @@ function registerTools(server, base) {
7607
7628
 
7608
7629
  // src/server.ts
7609
7630
  var SERVER_NAME = "lumitra-studio";
7610
- var SERVER_VERSION = "0.12.0";
7631
+ var SERVER_VERSION = "0.13.0";
7611
7632
  function createStudioMcpServer(opts = {}) {
7612
7633
  const config = opts.config ?? resolveConfig(opts.env ?? process.env);
7613
7634
  const client = new StudioClient(config, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marlinjai/studio-mcp",
3
- "version": "0.12.0",
3
+ "version": "0.13.0",
4
4
  "private": false,
5
5
  "description": "Model Context Protocol (MCP) server over the Lumitra Studio HTTP API: generate images, mint characters, run workflows, swap characters into video.",
6
6
  "license": "MIT",