Skip to main content
Glama

upscale

Enlarge or restore a single image using an installed model, then write the result to the configured write root.

Instructions

Upscale (or restore) one image with one model, writing the result under the write root.

Returns the job's status. When the job is done, `result` holds the output
path, sizes, model details, device and timing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
halfNoRun in float16 on the GPU (faster, less memory) if the model supports it.
inputYesInput image: absolute path inside a read root, or relative to the first read root. Anything Pillow reads, plus HEIC/HEIF/AVIF and 16-bit PNG/TIFF (kept at 16 bits).
modelYesModel file name or stem from list_models, e.g. 'RealESRGAN_x4plus'.
outputNoOutput path (absolute inside the write root, or relative to it). The suffix picks the format: .png .jpg .tif .webp; .png and .tif keep 16 bits for a deeper source. Default: <input stem>.<model stem>.<scale>.png in the write root.
overwriteNoReplace an existing output file.
tile_sizeNoTile edge in input pixels; 0 = whole image in one pass.
jpeg_qualityNoQuality for .jpg output.
output_scaleNoFinal size relative to the INPUT. Omit to keep the model's native scale (4x for a 4x model). 1 = resize back to the input size (for compositing over the original). Other values resize to that multiple with LANCZOS.
tile_overlapNoContext margin around each tile, in input pixels, to hide seams.
wait_secondsNoSeconds to wait for the job to finish before returning. Omit to wait until it is done. 0 returns the job id at once. A client that times out calls after about a minute should pass about 45 and poll job_status while the status is queued or running.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses that the call writes under the write root and returns a job status rather than a finished result, plus what `result` contains when done. However, it omits failure behavior, whether the operation is always async, and any auth/permission or resource constraints, so disclosure is partial.

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?

Three short sentences with the core action front-loaded and no filler. The trailing sentence about `result` contents earns its place given there is no output schema, though the description is terse enough that nothing needed trimming.

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?

For a 10-parameter mutation-style tool with no annotations and no output schema, the description supplies the essential missing piece: the shape of the returned job status and `result` fields. It stops short of covering error cases or the fact that the caller may need to poll, which would make it fully self-contained.

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 all ten parameters are already well documented in the schema. The description adds no parameter-level syntax, defaults, or constraints beyond what the schema provides, so the baseline 3 applies.

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 names a specific verb+resource+scope: 'Upscale (or restore) one image with one model, writing the result under the write root.' This is far more specific than a tautology and makes the single-image/single-model granularity clear. It does not explicitly differentiate itself from siblings like job_status or list_models, so it stops short of a 5.

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

Usage Guidelines3/5

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

Usage is only implied: 'one image with one model' hints that batching requires repeated calls, and the mention of returning job status implies the polling workflow, but no explicit when-to-use/when-not or alternative tools are named. The polling hint lives in the wait_seconds schema description rather than the tool description.

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