@vint.tri/report_gen_mcp 1.7.3 → 1.7.4
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/dist/index.js +12 -12
- package/dist/mcp/imageGenerationServer.js +10 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -103,7 +103,7 @@ if (process.argv.length === 2) {
|
|
|
103
103
|
// No command specified, run in stdio mode using MCP SDK
|
|
104
104
|
const mcpServer = new McpServer({
|
|
105
105
|
name: "report_gen_mcp",
|
|
106
|
-
version: "1.7.
|
|
106
|
+
version: "1.7.4"
|
|
107
107
|
}, {
|
|
108
108
|
// Disable health check to prevent automatic calls
|
|
109
109
|
capabilities: {
|
|
@@ -353,12 +353,12 @@ FOR THE NEURAL NETWORK: Please present the following information to the user:
|
|
|
353
353
|
description: "Generate an image from a text prompt using AI",
|
|
354
354
|
inputSchema: {
|
|
355
355
|
prompt: z.string().describe("Text prompt for image generation (must be in English)"),
|
|
356
|
-
width: z.
|
|
357
|
-
height: z.
|
|
358
|
-
guidance_scale: z.
|
|
356
|
+
width: z.string().optional().describe("Width of the image (128-2048 pixels)"),
|
|
357
|
+
height: z.string().optional().describe("Height of the image (128-2048 pixels)"),
|
|
358
|
+
guidance_scale: z.string().optional().describe("Strength of prompt following (1.0-20.0)"),
|
|
359
359
|
negative_prompt: z.string().optional().describe("Negative prompt (what NOT to include in the image)"),
|
|
360
|
-
num_inference_steps: z.
|
|
361
|
-
seed: z.
|
|
360
|
+
num_inference_steps: z.string().optional().describe("Number of generation steps (1-50)"),
|
|
361
|
+
seed: z.string().optional().describe("Seed for reproducibility (0 = random)")
|
|
362
362
|
},
|
|
363
363
|
}, async (params) => {
|
|
364
364
|
try {
|
|
@@ -379,20 +379,20 @@ FOR THE NEURAL NETWORK: Please present the following information to the user:
|
|
|
379
379
|
if (!prompt) {
|
|
380
380
|
throw new Error("Parameter 'prompt' is required");
|
|
381
381
|
}
|
|
382
|
-
// Prepare options for generateImage function
|
|
382
|
+
// Prepare options for generateImage function, converting string parameters to numbers
|
|
383
383
|
const options = {};
|
|
384
384
|
if (width !== undefined)
|
|
385
|
-
options.width = width;
|
|
385
|
+
options.width = typeof width === 'string' ? parseFloat(width) : width;
|
|
386
386
|
if (height !== undefined)
|
|
387
|
-
options.height = height;
|
|
387
|
+
options.height = typeof height === 'string' ? parseFloat(height) : height;
|
|
388
388
|
if (guidance_scale !== undefined)
|
|
389
|
-
options.guidance_scale = guidance_scale;
|
|
389
|
+
options.guidance_scale = typeof guidance_scale === 'string' ? parseFloat(guidance_scale) : guidance_scale;
|
|
390
390
|
if (negative_prompt !== undefined)
|
|
391
391
|
options.negative_prompt = negative_prompt;
|
|
392
392
|
if (num_inference_steps !== undefined)
|
|
393
|
-
options.num_inference_steps = num_inference_steps;
|
|
393
|
+
options.num_inference_steps = typeof num_inference_steps === 'string' ? parseInt(num_inference_steps) : num_inference_steps;
|
|
394
394
|
if (seed !== undefined)
|
|
395
|
-
options.seed = seed;
|
|
395
|
+
options.seed = typeof seed === 'string' ? parseInt(seed) : seed;
|
|
396
396
|
// Generate the image
|
|
397
397
|
const imageResult = await generateImage(prompt, options);
|
|
398
398
|
// Extract base64 data from the saved file
|
|
@@ -106,12 +106,12 @@ app.registerTool("generate_image", {
|
|
|
106
106
|
description: "Генерирует изображения. ВАЖНО: промпт и негативный промпт должны быть СТРОГО на английском языке!",
|
|
107
107
|
inputSchema: {
|
|
108
108
|
prompt: z.string().describe("Текстовый промпт для генерации изображения НА АНГЛИЙСКОМ ЯЗЫКЕ"),
|
|
109
|
-
width: z.
|
|
110
|
-
height: z.
|
|
111
|
-
guidance_scale: z.
|
|
109
|
+
width: z.string().optional().describe("Ширина изображения (128-2048)"),
|
|
110
|
+
height: z.string().optional().describe("Высота изображения (128-2048)"),
|
|
111
|
+
guidance_scale: z.string().optional().describe("Сила следования промпту (1.0-20.0)"),
|
|
112
112
|
negative_prompt: z.string().optional().describe("Негативный промпт (что НЕ включать в изображение)"),
|
|
113
|
-
num_inference_steps: z.
|
|
114
|
-
seed: z.
|
|
113
|
+
num_inference_steps: z.string().optional().describe("Количество шагов генерации (1-50)"),
|
|
114
|
+
seed: z.string().optional().describe("Seed для воспроизводимости (0 = случайный)")
|
|
115
115
|
},
|
|
116
116
|
}, async (args) => {
|
|
117
117
|
try {
|
|
@@ -199,12 +199,12 @@ app.registerTool("generate_image_to_file", {
|
|
|
199
199
|
prompt: z.string().describe("Текстовый промпт для генерации изображения НА АНГЛИЙСКОМ ЯЗЫКЕ"),
|
|
200
200
|
directory: z.string().describe("Каталог для сохранения изображения"),
|
|
201
201
|
filename: z.string().describe("Имя файла для сохранения (с расширением)"),
|
|
202
|
-
width: z.
|
|
203
|
-
height: z.
|
|
204
|
-
guidance_scale: z.
|
|
202
|
+
width: z.string().optional().describe("Ширина изображения (128-2048)"),
|
|
203
|
+
height: z.string().optional().describe("Высота изображения (128-2048)"),
|
|
204
|
+
guidance_scale: z.string().optional().describe("Сила следования промпту (1.0-20.0)"),
|
|
205
205
|
negative_prompt: z.string().optional().describe("Негативный промпт (что НЕ включать в изображение)"),
|
|
206
|
-
num_inference_steps: z.
|
|
207
|
-
seed: z.
|
|
206
|
+
num_inference_steps: z.string().optional().describe("Количество шагов генерации (1-50)"),
|
|
207
|
+
seed: z.string().optional().describe("Seed для воспроизводимости (0 = случайный)")
|
|
208
208
|
},
|
|
209
209
|
}, async (args) => {
|
|
210
210
|
try {
|