UNPKG

minimax-mcp-tools

Version:

Async MCP server with Minimax API integration for image generation and text-to-speech

278 lines 13.7 kB
import { z } from 'zod'; export declare const imageGenerationSchema: z.ZodObject<{ prompt: z.ZodString; outputFile: z.ZodString; aspectRatio: z.ZodDefault<z.ZodEnum<["1:1" | "16:9" | "4:3" | "3:2" | "2:3" | "3:4" | "9:16" | "21:9", ...("1:1" | "16:9" | "4:3" | "3:2" | "2:3" | "3:4" | "9:16" | "21:9")[]]>>; customSize: z.ZodOptional<z.ZodObject<{ width: z.ZodNumber; height: z.ZodNumber; }, "strip", z.ZodTypeAny, { width: number; height: number; }, { width: number; height: number; }>>; seed: z.ZodOptional<z.ZodNumber>; subjectReference: z.ZodOptional<z.ZodString>; style: z.ZodOptional<z.ZodObject<{ style_type: z.ZodEnum<["漫画" | "元气" | "中世纪" | "水彩", ...("漫画" | "元气" | "中世纪" | "水彩")[]]>; style_weight: z.ZodDefault<z.ZodNumber>; }, "strip", z.ZodTypeAny, { style_type: "漫画" | "元气" | "中世纪" | "水彩"; style_weight: number; }, { style_type: "漫画" | "元气" | "中世纪" | "水彩"; style_weight?: number | undefined; }>>; }, "strip", z.ZodTypeAny, { prompt: string; outputFile: string; aspectRatio: "1:1" | "16:9" | "4:3" | "3:2" | "2:3" | "3:4" | "9:16" | "21:9"; customSize?: { width: number; height: number; } | undefined; seed?: number | undefined; subjectReference?: string | undefined; style?: { style_type: "漫画" | "元气" | "中世纪" | "水彩"; style_weight: number; } | undefined; }, { prompt: string; outputFile: string; aspectRatio?: "1:1" | "16:9" | "4:3" | "3:2" | "2:3" | "3:4" | "9:16" | "21:9" | undefined; customSize?: { width: number; height: number; } | undefined; seed?: number | undefined; subjectReference?: string | undefined; style?: { style_type: "漫画" | "元气" | "中世纪" | "水彩"; style_weight?: number | undefined; } | undefined; }>; export declare const textToSpeechSchema: z.ZodObject<{ text: z.ZodString; outputFile: z.ZodString; highQuality: z.ZodDefault<z.ZodBoolean>; voiceId: z.ZodDefault<z.ZodEnum<[string, ...string[]]>>; speed: z.ZodDefault<z.ZodNumber>; volume: z.ZodDefault<z.ZodNumber>; pitch: z.ZodDefault<z.ZodNumber>; emotion: z.ZodDefault<z.ZodEnum<["neutral" | "happy" | "sad" | "angry" | "fearful" | "disgusted" | "surprised", ...("neutral" | "happy" | "sad" | "angry" | "fearful" | "disgusted" | "surprised")[]]>>; format: z.ZodDefault<z.ZodEnum<["mp3" | "wav" | "flac" | "pcm", ...("mp3" | "wav" | "flac" | "pcm")[]]>>; sampleRate: z.ZodDefault<z.ZodEnum<["8000" | "16000" | "22050" | "24000" | "32000" | "44100", ...("8000" | "16000" | "22050" | "24000" | "32000" | "44100")[]]>>; bitrate: z.ZodDefault<z.ZodEnum<["64000" | "96000" | "128000" | "160000" | "192000" | "224000" | "256000" | "320000", ...("64000" | "96000" | "128000" | "160000" | "192000" | "224000" | "256000" | "320000")[]]>>; languageBoost: z.ZodDefault<z.ZodString>; intensity: z.ZodOptional<z.ZodNumber>; timbre: z.ZodOptional<z.ZodNumber>; sound_effects: z.ZodOptional<z.ZodEnum<["spacious_echo" | "auditorium_echo" | "lofi_telephone" | "robotic", ...("spacious_echo" | "auditorium_echo" | "lofi_telephone" | "robotic")[]]>>; }, "strip", z.ZodTypeAny, { outputFile: string; text: string; highQuality: boolean; voiceId: string; speed: number; volume: number; pitch: number; emotion: "neutral" | "happy" | "sad" | "angry" | "fearful" | "disgusted" | "surprised"; format: "mp3" | "wav" | "flac" | "pcm"; sampleRate: "8000" | "16000" | "22050" | "24000" | "32000" | "44100"; bitrate: "64000" | "96000" | "128000" | "160000" | "192000" | "224000" | "256000" | "320000"; languageBoost: string; intensity?: number | undefined; timbre?: number | undefined; sound_effects?: "spacious_echo" | "auditorium_echo" | "lofi_telephone" | "robotic" | undefined; }, { outputFile: string; text: string; highQuality?: boolean | undefined; voiceId?: string | undefined; speed?: number | undefined; volume?: number | undefined; pitch?: number | undefined; emotion?: "neutral" | "happy" | "sad" | "angry" | "fearful" | "disgusted" | "surprised" | undefined; format?: "mp3" | "wav" | "flac" | "pcm" | undefined; sampleRate?: "8000" | "16000" | "22050" | "24000" | "32000" | "44100" | undefined; bitrate?: "64000" | "96000" | "128000" | "160000" | "192000" | "224000" | "256000" | "320000" | undefined; languageBoost?: string | undefined; intensity?: number | undefined; timbre?: number | undefined; sound_effects?: "spacious_echo" | "auditorium_echo" | "lofi_telephone" | "robotic" | undefined; }>; export declare const taskBarrierSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>; export type ImageGenerationParams = z.infer<typeof imageGenerationSchema>; export type TextToSpeechParams = z.infer<typeof textToSpeechSchema>; export type TaskBarrierParams = z.infer<typeof taskBarrierSchema>; export declare const imageGenerationToolSchema: { readonly type: "object"; readonly properties: { readonly prompt: { readonly type: "string"; readonly description: "Image generation prompt (max 1500 characters)"; readonly maxLength: 1500; }; readonly outputFile: { readonly type: "string"; readonly description: "Absolute path for generated image file"; }; readonly aspectRatio: { readonly type: "string"; readonly enum: readonly ["1:1", "16:9", "4:3", "3:2", "2:3", "3:4", "9:16", "21:9"]; readonly default: "1:1"; readonly description: `Aspect ratio for the image. Options: ${string}`; }; readonly customSize: { readonly type: "object"; readonly properties: { readonly width: { readonly type: "number"; readonly minimum: 512; readonly maximum: 2048; readonly multipleOf: 8; }; readonly height: { readonly type: "number"; readonly minimum: 512; readonly maximum: 2048; readonly multipleOf: 8; }; }; readonly required: readonly ["width", "height"]; readonly description: "Custom image dimensions (width x height in pixels). Range: 512-2048, must be multiples of 8. Total resolution should stay under 2M pixels. Only supported with image-01 model (cannot be used with style parameter). When both customSize and aspectRatio are set, aspectRatio takes precedence"; }; readonly seed: { readonly type: "number"; readonly description: "Random seed for reproducible results"; }; readonly subjectReference: { readonly type: "string"; readonly description: "File path to a portrait image for maintaining facial characteristics in generated images. Only supported with image-01 model (cannot be used with style parameter). Provide a clear frontal face photo for best results. Supports local file paths and URLs. Max 10MB, formats: jpg, jpeg, png"; }; readonly style: { readonly type: "object"; readonly properties: { readonly style_type: { readonly type: "string"; readonly enum: readonly ["漫画", "元气", "中世纪", "水彩"]; readonly description: `Art style type. Options: ${string}`; }; readonly style_weight: { readonly type: "number"; readonly exclusiveMinimum: 0; readonly maximum: 1; readonly default: 0.8; readonly description: "Style control weight (0-1]. Higher values apply stronger style effects. Default: 0.8"; }; }; readonly required: readonly ["style_type"]; readonly description: "Art style control settings. Uses image-01-live model which does not support customSize or subjectReference parameters. Cannot be combined with customSize or subjectReference"; }; }; readonly required: readonly ["prompt", "outputFile"]; }; export declare const textToSpeechToolSchema: { readonly type: "object"; readonly properties: { readonly text: { readonly type: "string"; readonly description: "Text to convert to speech. Max 10000 characters. Use newlines for paragraph breaks. For custom pauses, insert <#x#> where x is seconds (0.01-99.99, max 2 decimals). Pause markers must be between pronounceable text and cannot be consecutive"; readonly maxLength: 10000; readonly minLength: 1; }; readonly outputFile: { readonly type: "string"; readonly description: "Absolute path for audio file"; }; readonly highQuality: { readonly type: "boolean"; readonly default: false; readonly description: "Use high-quality model (speech-02-hd) for audiobooks/premium content. Default: false (uses faster speech-02-turbo)"; }; readonly voiceId: { readonly type: "string"; readonly enum: string[]; readonly default: "female-shaonv"; readonly description: `Voice ID for speech generation. Available voices: ${string}`; }; readonly speed: { readonly type: "number"; readonly minimum: 0.5; readonly maximum: 2; readonly default: 1; readonly description: "Speech speed multiplier (0.5-2). Higher values = faster speech"; }; readonly volume: { readonly type: "number"; readonly minimum: 0.1; readonly maximum: 10; readonly default: 1; readonly description: "Audio volume level (0.1-10). Higher values = louder audio"; }; readonly pitch: { readonly type: "number"; readonly minimum: -12; readonly maximum: 12; readonly default: 0; readonly description: "Pitch adjustment in semitones (-12 to 12). Negative = lower pitch, Positive = higher pitch"; }; readonly emotion: { readonly type: "string"; readonly enum: readonly ["neutral", "happy", "sad", "angry", "fearful", "disgusted", "surprised"]; readonly default: "neutral"; readonly description: `Emotional tone of the speech. Options: ${string}`; }; readonly format: { readonly type: "string"; readonly enum: readonly ["mp3", "wav", "flac", "pcm"]; readonly default: "mp3"; readonly description: `Output audio format. Options: ${string}`; }; readonly sampleRate: { readonly type: "string"; readonly enum: readonly ["8000", "16000", "22050", "24000", "32000", "44100"]; readonly default: "32000"; readonly description: `Audio sample rate in Hz. Options: ${string}`; }; readonly bitrate: { readonly type: "string"; readonly enum: readonly ["64000", "96000", "128000", "160000", "192000", "224000", "256000", "320000"]; readonly default: "128000"; readonly description: `Audio bitrate in bps. Options: ${string}`; }; readonly languageBoost: { readonly type: "string"; readonly default: "auto"; readonly description: "Enhance recognition for specific languages/dialects. Options: Chinese, Chinese,Yue, English, Arabic, Russian, Spanish, French, Portuguese, German, Turkish, Dutch, Ukrainian, Vietnamese, Indonesian, Japanese, Italian, Korean, Thai, Polish, Romanian, Greek, Czech, Finnish, Hindi, Bulgarian, Danish, Hebrew, Malay, Persian, Slovak, Swedish, Croatian, Filipino, Hungarian, Norwegian, Slovenian, Catalan, Nynorsk, Tamil, Afrikaans, auto. Use 'auto' for automatic detection"; }; readonly intensity: { readonly type: "number"; readonly minimum: -100; readonly maximum: 100; readonly description: "Voice intensity adjustment (-100 to 100). Values closer to -100 make voice more robust, closer to 100 make voice softer"; }; readonly timbre: { readonly type: "number"; readonly minimum: -100; readonly maximum: 100; readonly description: "Voice timbre adjustment (-100 to 100). Values closer to -100 make voice more mellow, closer to 100 make voice more crisp"; }; readonly sound_effects: { readonly type: "string"; readonly enum: readonly ["spacious_echo", "auditorium_echo", "lofi_telephone", "robotic"]; readonly description: string; }; }; readonly required: readonly ["text", "outputFile"]; }; export declare const taskBarrierToolSchema: { readonly type: "object"; readonly properties: {}; }; export declare function validateImageParams(params: unknown): ImageGenerationParams; export declare function validateTTSParams(params: unknown): TextToSpeechParams; export declare function validateTaskBarrierParams(params: unknown): TaskBarrierParams; //# sourceMappingURL=schemas.d.ts.map