Skip to main content
Glama

Upscale

upscale

Real-ESRGAN upscale; prefer 2x on text-heavy images. Takes about 46 s on a warm GPU (beta — no SLA). Returns the processed image in an image content block, at the input's pixel size by default (long edge clamped to 4096 px — a larger input comes back scaled down). 'scale' is nominal: the output's long edge is min(scale × the input's, 4096 px). Free tiers: 10/day per anonymous IP, 30/day with a key; $0.01 per image beyond that. The quota left is echoed in the result text. A job that outruns the wait comes back as a status_url to poll.

Input Schema

NameRequiredDescriptionDefault
waitNoSeconds to block waiting for the result (1–25). Past 25 the honest answer is a 202 + status_url you poll yourself, because MCP hosts time tool calls out.
scaleNoUse 2x for packaging text4
engineNoPick x4plus for text-heavy images: less halo and stroke adhesionultrasharp
image_urlNoPublic http(s) URL of the image to process (JPEG/PNG/WebP, max 10 MB). Use a hostname, not an IP literal.
verifyTextNoOptional: OCR before/after and report missing or changed text. ~+5s on sparse text, up to +30s when text is dense
image_base64NoThe image itself, base64-encoded (JPEG/PNG/WebP, max 10 MB). A data-URI prefix (RFC 2397) is accepted. Provide either this or image_url.

Output Schema

NameRequiredDescriptionDefault
codeNoStable error code, e.g. quota_exhausted, unauthorized, rate_limited.
hintNoWhat the caller should do next, in plain words (quota errors).
usedNoImages already used today on that ledger.
bytesNoSize of the returned image in bytes.
limitNoThe daily allowance that was reached.
loginNoLogin URL — only when an anonymous caller ran out of quota.
job_idNoJob id, also sent as the x-job-id response header.
accountNoAccount page: usage, API keys, buying credits.
mimeTypeNoe.g. image/png
registerNoSign-up URL — only when an anonymous caller ran out of quota.
quota_kindNoWhich ledger ran out: anon, key, or web.
status_urlNoOnly when the job is still running (HTTP 202).
http_statusNoThe HTTP status the REST layer answered with.
remaining_todayNoImages left on this caller's daily quota.
price_per_image_cnyNoThe same price in CNY, rounded.
price_per_image_usdNoPrepaid price per image past the free allowance.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed11 schema fields changed
    • addedOutput schema / properties / account
      Added value: +{
      +  "description": "Account page: usage, API keys, buying credits.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / code
      Added value: +{
      +  "description": "Stable error code, e.g. quota_exhausted, unauthorized, rate_limited.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / hint
      Added value: +{
      +  "description": "What the caller should do next, in plain words (quota errors).",
      +  "type": "string"
      +}
    • addedOutput schema / properties / http_status
      Added value: +{
      +  "description": "The HTTP status the REST layer answered with.",
      +  "type": "integer"
      +}
    • addedOutput schema / properties / limit
      Added value: +{
      +  "description": "The daily allowance that was reached.",
      +  "type": "integer"
      +}
    • addedOutput schema / properties / login
      Added value: +{
      +  "description": "Login URL — only when an anonymous caller ran out of quota.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / price_per_image_cny
      Added value: +{
      +  "description": "The same price in CNY, rounded.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / price_per_image_usd
      Added value: +{
      +  "description": "Prepaid price per image past the free allowance.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / quota_kind
      Added value: +{
      +  "description": "Which ledger ran out: anon, key, or web.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / register
      Added value: +{
      +  "description": "Sign-up URL — only when an anonymous caller ran out of quota.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / used
      Added value: +{
      +  "description": "Images already used today on that ledger.",
      +  "type": "integer"
      +}
  2. Added

TDQS

A4.6/5.0
Behavior5/5

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

The annotations only declare readOnlyHint=false, destructiveHint=false and openWorldHint=false, so the description carries most of the disclosure burden and does so richly: latency, beta/no-SLA status, per-tier quotas and per-image pricing, the 4096 px long-edge clamp, and polling behaviour for long jobs. It also states the return form (image content block) and echoes quota in the result text, which an agent needs in order to predict cost and handle overruns.

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

Conciseness4/5

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

Front-loaded with the engine and the 2x recommendation, and every sentence carries operational information. It loses a point for mild redundancy: the 4096 px clamp is stated once in the return-format sentence and again in the 'scale is nominal' sentence, and the single paragraph is dense enough to be hard to scan.

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?

For a 6-parameter compute job with quotas, latency, polling and a downscale clamp, the definition covers everything an agent needs to call it correctly and interpret the failure mode. The existence of an output schema is supplemented, not restated, by the note that the image is returned in a content block at the input's pixel size.

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

Parameters4/5

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

Schema description coverage is already 100%, so the baseline is 3. The description nonetheless adds non-derivable meaning — that 'scale' is nominal, with the output long edge being min(scale × input, 4096 px) — which corrects a natural misreading of the enum values and justifies going above baseline.

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?

Names the specific operation and engine ('Real-ESRGAN upscale') and scopes the output precisely. The purpose is unambiguous and cannot be confused with the remove_background sibling, which is a different resource transformation.

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?

Gives concrete selection advice ('prefer 2x on text-heavy images', 'Pick x4plus for text-heavy images') plus real constraints — 46 s warm-GPU latency, beta with no SLA, tier quotas, and when a job degrades to a status_url. It does not name an alternative tool or state when not to upscale at all, so it stops short of explicit when/when-not routing.

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.