@falldownthesystem/imagen-mcp 0.1.0 → 0.1.1
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 -1
- package/dist/index.js +2 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -74,7 +74,8 @@ Reference images to image. Required: `prompt`, `images`. The model regenerates t
|
|
|
74
74
|
|---|---|---|---|
|
|
75
75
|
| `images` | 1 to 16 file paths | required | `png`, `jpeg`, or `webp`. The first image is the main subject; extra images supply elements to combine, such as a logo or a style reference. Relative paths resolve against the server working directory. |
|
|
76
76
|
| `mask` | file path | none | PNG with an alpha channel, same width and height as the first image. Fully transparent pixels mark the region the model may repaint; opaque pixels mark what to keep. Use for inpainting one area or filling an extended canvas. It is guidance, not a hard pixel lock. |
|
|
77
|
-
|
|
77
|
+
|
|
78
|
+
There is no `input_fidelity` option. The GPT Image 2.5 models always process reference images at high fidelity, and the API rejects the parameter. Faces, logos, text, and textures from the references are preserved by default.
|
|
78
79
|
|
|
79
80
|
### Shared options
|
|
80
81
|
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ catch {
|
|
|
14
14
|
// No .env file present; rely on the process environment.
|
|
15
15
|
}
|
|
16
16
|
const client = new OpenAI();
|
|
17
|
-
const server = new McpServer({ name: "imagen-mcp", version: "0.1.
|
|
17
|
+
const server = new McpServer({ name: "imagen-mcp", version: "0.1.1" });
|
|
18
18
|
const MIME = { png: "image/png", jpeg: "image/jpeg", webp: "image/webp" };
|
|
19
19
|
const outputSchema = z.object({
|
|
20
20
|
files: z.array(z.string()),
|
|
@@ -94,7 +94,7 @@ server.registerTool("generate_image", {
|
|
|
94
94
|
});
|
|
95
95
|
server.registerTool("edit_image", {
|
|
96
96
|
title: "Edit image",
|
|
97
|
-
description: "Edit, restyle, or combine 1-16 reference images with a text prompt using OpenAI GPT Image 2.5. The whole picture is regenerated; without a mask the prompt decides what changes. Saves files to disk and returns paths and token usage.",
|
|
97
|
+
description: "Edit, restyle, or combine 1-16 reference images with a text prompt using OpenAI GPT Image 2.5. The whole picture is regenerated; without a mask the prompt decides what changes. Reference details are always kept at high fidelity (no input_fidelity option). Saves files to disk and returns paths and token usage.",
|
|
98
98
|
inputSchema: z.object({
|
|
99
99
|
...commonInput,
|
|
100
100
|
images: z
|
|
@@ -106,10 +106,6 @@ server.registerTool("edit_image", {
|
|
|
106
106
|
.string()
|
|
107
107
|
.optional()
|
|
108
108
|
.describe("Path of a PNG with alpha, same size as first image. Transparent pixels = region to repaint (guidance, not a hard lock). Default none."),
|
|
109
|
-
input_fidelity: z
|
|
110
|
-
.enum(["high", "low"])
|
|
111
|
-
.optional()
|
|
112
|
-
.describe("high keeps faces, text, logos and unmasked areas faithful; costs more input tokens. Default low."),
|
|
113
109
|
}),
|
|
114
110
|
outputSchema,
|
|
115
111
|
annotations,
|
|
@@ -119,7 +115,6 @@ server.registerTool("edit_image", {
|
|
|
119
115
|
...params,
|
|
120
116
|
image: await Promise.all(input.images.map(loadImage)),
|
|
121
117
|
mask: input.mask ? await loadImage(input.mask) : undefined,
|
|
122
|
-
input_fidelity: input.input_fidelity,
|
|
123
118
|
});
|
|
124
119
|
return saveImages(result, input, params.model, params.size);
|
|
125
120
|
});
|