Skip to main content
Glama
recraft-ai

Recraft AI MCP Server

Official

crisp_upscale

Upscale an image to make it sharper and cleaner. A faster and cheaper alternative to creative upscale.

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. It parses the imageURI argument, downloads the image, calls the crispUpscale API, and returns the result.
    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
        }
      }
    }
  • The tool definition including name ('crisp_upscale'), description, and inputSchema (requires imageURI).
    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"]
      }
    }
  • The CrispUpscaleRequest interface defining the API request parameters (image Blob, expire, imageFormat, responseFormat).
    export interface CrispUpscaleRequest {
        image: Blob;
        expire?: boolean;
        imageFormat?: ImageFormat;
        responseFormat?: ResponseFormat;
    }
  • src/index.ts:77-79 (registration)
    Registration of crispUpscaleTool in the server's tool list.
    crispUpscaleTool,
    creativeUpscaleTool,
    getUserTool,
  • src/index.ts:114-115 (registration)
    Handler dispatch for crisp_upscale in the CallToolRequest handler switch statement.
    case crispUpscaleTool.name:
      return await crispUpscaleHandler(recraftServer, args ?? {})
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Describes the operation (input image, returns upscaled image) and mentions output type (local path or URL with preview). Does not disclose potential errors, side effects, or authorization requirements. Annotations would help but are absent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three efficient sentences with no waste. Front-loaded with main purpose and key differentiator.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers input, operation, and output format (local path or URL + preview). Lacks details on persistence or mutation, but adequate given simplicity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Only one parameter with full schema description. Tool description does not add new meaning beyond schema for the parameter. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states the tool upscales an input image using Recraft, making it sharper. Distinguishes from creative_upscale by noting it is cheaper and faster.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides comparison with creative_upscale, indicating when to choose this version based on cost and speed. No explicit when-not-to-use but implied by the comparison.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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