Skip to main content
Glama

venice_upscale_image

Increase image resolution and quality using AI upscaling technology. Specify scale factor to enlarge images while maintaining clarity.

Instructions

Upscale an image using Venice AI

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
imageYesBase64-encoded image data or URL
scaleNoUpscale factor (2, 4, etc.)

Implementation Reference

  • Handler function that sends the image and scale to Venice AI's /images/upscale endpoint via veniceAPI, parses the response, and returns success URL or error.
    async ({ image, scale }) => {
      const response = await veniceAPI("/images/upscale", { method: "POST", body: JSON.stringify({ image, scale }) });
      const data = await response.json() as ImageUpscaleResponse;
      if (!response.ok) return { content: [{ type: "text" as const, text: `Error: ${data.error?.message || response.statusText}` }] };
      return { content: [{ type: "text" as const, text: data.data?.url ? `Upscaled: ${data.data.url}` : "Image upscaled" }] };
    }
  • Zod schema defining the input parameters: image (string, base64 or URL), scale (number, optional default 2).
    {
      image: z.string().describe("Base64-encoded image data or URL"),
      scale: z.number().optional().default(2).describe("Upscale factor (2, 4, etc.)"),
    },
  • Direct registration of the venice_upscale_image tool on the MCP server within registerInferenceTools.
    server.tool(
      "venice_upscale_image",
      "Upscale an image using Venice AI",
      {
        image: z.string().describe("Base64-encoded image data or URL"),
        scale: z.number().optional().default(2).describe("Upscale factor (2, 4, etc.)"),
      },
      async ({ image, scale }) => {
        const response = await veniceAPI("/images/upscale", { method: "POST", body: JSON.stringify({ image, scale }) });
        const data = await response.json() as ImageUpscaleResponse;
        if (!response.ok) return { content: [{ type: "text" as const, text: `Error: ${data.error?.message || response.statusText}` }] };
        return { content: [{ type: "text" as const, text: data.data?.url ? `Upscaled: ${data.data.url}` : "Image upscaled" }] };
      }
    );
  • src/index.ts:16-16 (registration)
    Top-level call to registerInferenceTools which includes the venice_upscale_image tool.
    registerInferenceTools(server);
  • Shared helper function veniceAPI that performs authenticated fetch requests to Venice AI API endpoints.
    export async function veniceAPI(endpoint: string, options: RequestInit = {}): Promise<Response> {
      const url = `${BASE_URL}${endpoint}`;
      const headers: Record<string, string> = {
        "Authorization": `Bearer ${API_KEY}`,
        "Content-Type": "application/json",
        ...(options.headers as Record<string, string> || {}),
      };
      return fetch(url, { ...options, headers });
    }
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral disclosure. It states the action ('upscale') but doesn't describe what happens during processing (e.g., AI model used, processing time, rate limits, error conditions, or output format). For a tool that likely involves external API calls and image transformation, this lack of context is a significant gap.

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?

The description is a single, efficient sentence that states the core functionality without unnecessary words. It's front-loaded with the primary action ('Upscale an image') and includes the service context ('using Venice AI'). Every part of the sentence earns its place, making it maximally concise.

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

Completeness2/5

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

Given the tool's complexity (AI-based image processing), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what the upscaled image output looks like (e.g., format, size), potential errors, or behavioral aspects like cost or latency. The description alone is insufficient for an agent to use this tool confidently.

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?

Schema description coverage is 100%, so the schema fully documents both parameters ('image' as base64/URL, 'scale' as factor with default 2). The description adds no additional parameter semantics beyond what's in the schema, such as supported image formats, scale limitations, or quality trade-offs. Baseline 3 is appropriate when schema does all the work.

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

Purpose4/5

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

The description clearly states the verb ('upscale') and resource ('an image') with the service provider ('using Venice AI'), making the purpose immediately understandable. It distinguishes from siblings like 'venice_generate_image' (creation) and 'venice_text_to_speech' (different modality). However, it doesn't specify the exact upscaling algorithm or quality characteristics, keeping it at 4 rather than 5.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., image format requirements), when not to use it (e.g., for non-image files), or compare it to sibling tools like 'venice_generate_image' for image creation versus enhancement. The agent must infer usage from the tool name alone.

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/georgeglarson/venice-mcp'

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