Skip to main content
Glama

Expand image (outpaint)

outpaint_image

Extend an image beyond its borders by setting per-side pixel or percent expansion and a prompt for the new area; canvas, mask, and sizes build automatically while original pixels stay exact.

Instructions

Extend an image beyond its borders. Give the expansion per side in pixels or percent; the canvas, mask and model-aligned sizes are built automatically and the original pixels are preserved exactly.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topNo
leftNo
seedNoSeed for reproducible results; omit or -1 for random
rightNo
unitsNoUnits for left/right/top/bottom; percent is relative to the image width (left/right) or height (top/bottom)pixels
bottomNo
promptYesWhat the extended area should contain
qualityNoAll run Qwen-Image 2.1 Turbo (8 steps): fast = ~1 MP (the default, fastest); balanced = ~1.5K; quality = native 2K (slowest; edits share 2K with their references)
image_pathYes
output_pathNoOptional destination (absolute, or relative to the project). Must be inside the project or the app output folder. Existing files are never overwritten; a numbered name is used instead.
include_previewNoAlso return a small JPEG preview in the tool result. Default false: images stay local and are not sent to the model.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.9.3

TDQS

A3.5/5.0
Behavior4/5

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

Annotations declare the safety profile (non-destructive write, not idempotent), and the description adds meaningful behavior beyond that: canvas, mask, and model-aligned sizes are auto-derived, and the original pixels are preserved exactly. It still omits where the new file lands and what the runtime cost is for the three quality tiers.

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?

Two sentences with no padding; the core operation is front-loaded and the automatic-canvas note follows immediately. Every clause carries information.

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

Completeness3/5

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

For an 11-parameter generation tool with no output schema, the description covers the mechanic but not the result: whether an image file is written, where it is written by default, or how long the quality tiers take is left to the schema and annotations. Adequate, but an agent cannot fully predict the call outcome.

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 coverage is 55%; the description maps the expansion to per-side values and pixels/percent, which corresponds to top/left/right/bottom and units. However, several parameters (quality, seed, output_path, include_preview) are documented only in the schema, so the description adds little beyond the coverage baseline.

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?

States a specific verb and resource ('Extend an image beyond its borders'), which naturally separates it from inpaint (fill inside) and upscale (resize). It never names a sibling tool, so an agent must infer the boundary rather than being told it.

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 explains how to specify the expansion but not when to reach for this tool instead of edit_image, inpaint_image, or generate_image, and gives no prerequisites or exclusions. Usage is only implied by the operation itself.

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