ideogram-mcp-server
Version:
A FastMCP server for the Ideogram AI API.
74 lines (73 loc) • 3.07 kB
TypeScript
/**
* Reframe Tool
* Image reframing tool implementation using FastMCP framework
*/
import { z } from 'zod';
import { IdeogramApiClient } from '../utils/api-client.js';
import { FileManager } from '../utils/file-manager.js';
declare const reframeSchema: z.ZodObject<{
image_file: z.ZodString;
aspect_ratio: 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>;
num_images: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
aspect_ratio: "ASPECT_1_1" | "ASPECT_16_9" | "ASPECT_9_16" | "ASPECT_4_3" | "ASPECT_3_4";
image_file: string;
model?: "V_1" | "V_2" | "V_2_TURBO" | undefined;
magic_prompt_option?: "AUTO" | "ON" | "OFF" | undefined;
seed?: number | undefined;
num_images?: number | undefined;
}, {
aspect_ratio: "ASPECT_1_1" | "ASPECT_16_9" | "ASPECT_9_16" | "ASPECT_4_3" | "ASPECT_3_4";
image_file: string;
model?: "V_1" | "V_2" | "V_2_TURBO" | undefined;
magic_prompt_option?: "AUTO" | "ON" | "OFF" | undefined;
seed?: number | undefined;
num_images?: number | undefined;
}>;
export declare function createReframeTool(apiClient: IdeogramApiClient, fileManager: FileManager): {
name: string;
description: string;
parameters: {
readonly "~standard": any;
readonly type: "object";
readonly properties: {
readonly image_file: {
readonly type: "string";
readonly description: "Path to the image file to reframe";
};
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: "Target aspect ratio for the reframed image";
};
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 num_images: {
readonly type: "number";
readonly minimum: 1;
readonly maximum: 8;
readonly description: "Number of images to generate";
};
};
readonly required: readonly ["image_file", "aspect_ratio"];
};
execute: (args: unknown) => Promise<string>;
};
export { reframeSchema };