Skip to main content
Glama

upscale_image

Upscale an existing generated image (from a prior generate_image call) to a higher resolution -- the same "1K/2K/4K" choice Flow offers when downloading.

account: the Google account whose project owns media_id. Do not guess it and do not
ask the user: the generate_image result you already have carries it in the
`account_used` field -- pass that value verbatim. A media_id only exists inside the
project of the account that produced it, so any other account returns a clean error.

target_resolution: "2K" or "4K". Not every image supports upscaling (depends on the
source model/size) and 4K may be locked behind a paid plan tier on some accounts --
both cases come back as a clean error rather than a crash, so just report it if that
happens instead of retrying.

Takes roughly 15-30s -- returns a job_id to poll with check_job if it is not done
within ~35s.

Returns {"media_id": <new upscaled mediaId>, "download_path": "/v1/media/....jpg",
"resolution": ...} when done.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountYes
media_idYes
target_resolutionNo2K

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A5/5.0
Behavior5/5

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

Goes well beyond the minimal annotations: discloses 15-30s async behavior, the job_id polling mechanism, clean-failure cases for unsupported images or paid-tier locks, and the exact success response shape. This is exactly the behavioral context an agent needs and none of it contradicts the annotations.

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?

Every sentence carries operational value. The purpose is front-loaded, parameters are clearly labeled, and the async/error/output details are organized without redundancy. It is long, but the length is justified by the tool's complexity.

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

Completeness5/5

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

Covers precondition, selection, behavior, failure modes, timing, polling, and return structure despite lacking an output schema. An agent has everything needed to invoke this tool correctly and handle its results.

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

Parameters5/5

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

Schema coverage is 0%, but the description fully compensates: account is detailed with source and constraints, target_resolution is enumerated with caveats, and media_id is contextually defined as a prior generation result. This is more informative than the schema alone.

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?

The description opens with a specific verb ('Upscale') and resource ('existing generated image from a prior generate_image call'), and clarifies the resolution options. It clearly differentiates from siblings like upscale_video by restricting to generated images.

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

Usage Guidelines5/5

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

Provides explicit when-to-use context ('from a prior generate_image call'), warns against guessing or asking the user about account, identifies the account_used field as the correct source, and instructs to report clean errors rather than retry. It also names check_job as the polling alternative for the async case.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.