image-converter-mcp
Version:
image-converter MCP server
22 lines (21 loc) • 1.45 kB
JavaScript
// src/prompts/GetWebpFromPngFilePrompt.ts
import { z } from 'zod';
// Schema similar to PngFileToWebpTool's input
// For prompts, file input might be represented as a URL or a path string initially.
// The actual file handling would be part of the prompt's execution logic if it were fully implemented.
export const GetWebpFromPngFilePromptSchema = z.object({
// For a prompt, we might expect a file path or a URL to a file that the prompt executor can access.
// Or, if the MCP client handles file uploads for prompts, it could be a reference to an uploaded file.
// Here, we'll use a simple string to represent the file identifier for the schema.
// The description should clarify how the file is expected to be provided.
fileIdentifier: z.string().describe("Identifier for the PNG file (e.g., a local path or a URL accessible to the prompt executor). The actual file content is expected to be handled by the prompt execution environment."),
quality: z.number().min(1).max(100).optional().default(80).describe("Quality of the WebP image (1-100)"),
lossless: z.boolean().optional().default(false).describe("Use lossless compression"),
});
export class GetWebpFromPngFilePrompt {
name = "get_webp_from_png_file";
description = "Takes a PNG file (identified by a path or URL) and returns a WebP image. (This is a placeholder prompt)";
get schema() {
return GetWebpFromPngFilePromptSchema;
}
}