ideogram-mcp-server
Version:
A FastMCP server for the Ideogram AI API.
81 lines (80 loc) • 3.52 kB
TypeScript
/**
* Generate Tool
* Image generation tool implementation using FastMCP framework
*/
import { z } from 'zod';
import { IdeogramApiClient } from '../utils/api-client.js';
declare const generateSchema: z.ZodObject<{
prompt: z.ZodString;
aspect_ratio: z.ZodOptional<z.ZodEnum<["ASPECT_1_1", "ASPECT_16_9", "ASPECT_9_16", "ASPECT_4_3", "ASPECT_3_4"]>>;
model: z.ZodOptional<z.ZodEnum<["V_1", "V_2", "V_2_TURBO"]>>;
magic_prompt_option: z.ZodOptional<z.ZodEnum<["AUTO", "ON", "OFF"]>>;
seed: z.ZodOptional<z.ZodNumber>;
style_type: z.ZodOptional<z.ZodEnum<["AUTO", "GENERAL", "REALISTIC", "DESIGN", "RENDER_3D", "ANIME"]>>;
num_images: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
prompt: string;
aspect_ratio?: "ASPECT_1_1" | "ASPECT_16_9" | "ASPECT_9_16" | "ASPECT_4_3" | "ASPECT_3_4" | undefined;
model?: "V_1" | "V_2" | "V_2_TURBO" | undefined;
magic_prompt_option?: "AUTO" | "ON" | "OFF" | undefined;
seed?: number | undefined;
style_type?: "AUTO" | "GENERAL" | "REALISTIC" | "DESIGN" | "RENDER_3D" | "ANIME" | undefined;
num_images?: number | undefined;
}, {
prompt: string;
aspect_ratio?: "ASPECT_1_1" | "ASPECT_16_9" | "ASPECT_9_16" | "ASPECT_4_3" | "ASPECT_3_4" | undefined;
model?: "V_1" | "V_2" | "V_2_TURBO" | undefined;
magic_prompt_option?: "AUTO" | "ON" | "OFF" | undefined;
seed?: number | undefined;
style_type?: "AUTO" | "GENERAL" | "REALISTIC" | "DESIGN" | "RENDER_3D" | "ANIME" | undefined;
num_images?: number | undefined;
}>;
export declare function createGenerateTool(apiClient: IdeogramApiClient): {
name: string;
description: string;
parameters: {
readonly "~standard": any;
readonly type: "object";
readonly properties: {
readonly prompt: {
readonly type: "string";
readonly description: "Text prompt for image generation";
};
readonly aspect_ratio: {
readonly type: "string";
readonly enum: readonly ["ASPECT_1_1", "ASPECT_16_9", "ASPECT_9_16", "ASPECT_4_3", "ASPECT_3_4"];
readonly description: "Image aspect ratio";
};
readonly model: {
readonly type: "string";
readonly enum: readonly ["V_1", "V_2", "V_2_TURBO"];
readonly description: "Model version to use";
};
readonly magic_prompt_option: {
readonly type: "string";
readonly enum: readonly ["AUTO", "ON", "OFF"];
readonly description: "Magic prompt enhancement";
};
readonly seed: {
readonly type: "number";
readonly minimum: 0;
readonly maximum: 2147483647;
readonly description: "Random seed for reproducibility";
};
readonly style_type: {
readonly type: "string";
readonly enum: readonly ["AUTO", "GENERAL", "REALISTIC", "DESIGN", "RENDER_3D", "ANIME"];
readonly description: "Style type";
};
readonly num_images: {
readonly type: "number";
readonly minimum: 1;
readonly maximum: 8;
readonly description: "Number of images to generate";
};
};
readonly required: readonly ["prompt"];
};
execute: (args: unknown) => Promise<string>;
};
export { generateSchema };