Skip to main content
Glama

crisp_upscale

Enhance image clarity and sharpness with Recraft AI MCP Server's upscale tool. Input a local file or URL to receive a higher-quality, upscaled image and preview.

Instructions

Crisp upscale of the input image using Recraft. This operation takes an input image and returns an upscaled image, making the image sharper and cleaner. This version of upscale is much cheaper and faster than creative upscale. Local path or URL to resulting image and its preview will be returned in the response.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
imageURIYesImage 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

  • The main handler function for the crisp_upscale tool. Downloads the input image, calls the Recraft API's crispUpscale method, and returns the result formatted for MCP.
    export const crispUpscaleHandler = 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.crispUpscale({ image: await imageDataToBlob(imageData), responseFormat: 'url', expire: server.isLocalResultsStorage, }) return await server.transformSingleImageOperationToCallToolResult(result.image, 'Crisp upscale completed.') } catch (error) { return { content: [ { type: 'text', text: `Crisp upscale error: ${error}` } ], isError: true } } }
  • Tool definition including name, description, and input schema for validation.
    export const crispUpscaleTool = { name: "crisp_upscale", description: "Crisp upscale of the input image using Recraft.\n" + "This operation takes an input image and returns an upscaled image, making the image sharper and cleaner.\n" + "This version of upscale is much cheaper and faster than creative 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/index.ts:68-82 (registration)
    Registration of crispUpscaleTool in the MCP server's list of available tools.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: [ generateImageTool, createStyleTool, vectorizeImageTool, imageToImageTool, removeBackgroundTool, replaceBackgroundTool, crispUpscaleTool, creativeUpscaleTool, getUserTool, ], } })
  • src/index.ts:114-115 (registration)
    Dispatch to crispUpscaleHandler in the MCP call tool request handler switch statement.
    case crispUpscaleTool.name: return await crispUpscaleHandler(recraftServer, args ?? {})
  • TypeScript interface defining the request schema for the underlying Recraft API crispUpscale endpoint.
    export interface CrispUpscaleRequest { image: Blob; expire?: boolean; imageFormat?: ImageFormat; responseFormat?: ResponseFormat; }

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/recraft-ai/mcp-recraft-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server