creative_upscale
Enhance image quality by upscaling resolution and refining details, especially for faces, using advanced Recraft AI technology. Accepts image URLs or local paths for processing.
Instructions
Creative upscale of the input image using Recraft. This operation takes an input image and returns an upscaled image, boosting resolution with a focus on refining small details and faces. This version of upscale is expensive and slower than crisp upscale. Local path or URL to resulting image and its preview will be returned in the response.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| imageURI | Yes | Image to use as an input. This can be a URL (starting with http:// or https://) or an absolute file path (starting with file://). |
Implementation Reference
- src/tools/CreativeUpscale.ts:8-21 (schema)Tool definition with name, description, and input schema for creative_upscale.export const creativeUpscaleTool = { name: "creative_upscale", description: "Creative upscale of the input image using Recraft.\n" + "This operation takes an input image and returns an upscaled image, boosting resolution with a focus on refining small details and faces.\n" + "This version of upscale is expensive and slower than crisp upscale.\n" + "Local path or URL to resulting image and its preview will be returned in the response.", inputSchema: { type: "object", properties: { imageURI: PARAMETERS.imageURI, }, required: ["imageURI"] } }
- src/tools/CreativeUpscale.ts:23-49 (handler)Handler function that validates args, downloads image, calls Recraft API creativeUpscale, and returns formatted result or error.export const creativeUpscaleHandler = async (server: RecraftServer, args: Record<string, unknown>): Promise<CallToolResult> => { try { const { imageURI } = z.object({ imageURI: z.string(), }).parse(args) const imageData = await downloadImage(imageURI) const result = await server.api.imageApi.creativeUpscale({ image: await imageDataToBlob(imageData), responseFormat: 'url', expire: server.isLocalResultsStorage, }) return await server.transformSingleImageOperationToCallToolResult(result.image, 'Creative upscale completed.') } catch (error) { return { content: [ { type: 'text', text: `Creative upscale error: ${error}` } ], isError: true } } }
- src/index.ts:68-82 (registration)Registers creativeUpscaleTool in the MCP listTools response.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: [ generateImageTool, createStyleTool, vectorizeImageTool, imageToImageTool, removeBackgroundTool, replaceBackgroundTool, crispUpscaleTool, creativeUpscaleTool, getUserTool, ], } })
- src/index.ts:116-117 (registration)Dispatches calls to creative_upscale to the corresponding handler in the MCP callTool handler.case creativeUpscaleTool.name: return await creativeUpscaleHandler(recraftServer, args ?? {})