Skip to main content
Glama

Extend / outpaint an image

extend_image
Idempotent

Extend an image (from a public URL) beyond its original borders, generating new content in the added area to reach a target aspect ratio. This spends credits and starts an asynchronous job — it returns a job_id immediately; poll get_job with that id until status is 'completed' or 'failed'.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "image_url": "<image_url>",
      "aspect_ratio": "<aspect_ratio>",
      "request_id": "<request_id>"
    },
    "name": "extend_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
promptNoOptional guidance for what to generate in the extended area. Omit to let the model continue the scene naturally.
positionNoWhere the original image sits inside the new canvas (which sides get extended). Defaults to 'center'.
image_urlYesA public HTTP(S) URL pointing directly to a JPG, PNG, WEBP, or GIF image. Local files are not supported.
request_idYesA unique id for this request, supplied by the caller. Retrying the same request_id returns the original job instead of creating and charging for a new one.
aspect_ratioYesTarget aspect ratio for the extended canvas. 'original' keeps the source ratio and only pads; the others outpaint to that ratio.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses the cost (credits), the asynchronous nature, the immediate job_id return, and the required polling loop with terminal statuses. The request_id retry-idempotency behavior is documented in the schema, complementing the idempotentHint annotation. No contradictions with readOnlyHint=false, openWorldHint=true, destructiveHint=false.

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, front-loaded with the core action and followed by the critical async/cost caveat. Every sentence carries load-bearing information; nothing is filler.

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?

No output schema exists, but the description explains the return value (a job_id) and how to resolve it (poll get_job). For a 5-param, async, credit-spending tool, the description plus the fully documented schema covers everything an agent needs.

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 five parameters including the position enum and aspect_ratio enum are already well documented. The description adds only the constraint that the image comes from a public URL, which the schema also covers. Baseline 3 is appropriate.

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?

States a specific verb (extend/outpaint) and resource (an image) plus the exact mechanism: generating new content beyond original borders to reach a target aspect ratio. This is clearly distinct from siblings like convert_image_to_layers and generate_svg_from_text, and it names get_job as the follow-up tool.

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?

The description supplies the full workflow: call this tool, receive a job_id immediately, then poll get_job until status is 'completed' or 'failed'. It also flags that the call spends credits. It doesn't discuss when NOT to use it (e.g., non-public/local images or alternatives), but no sibling offers overlapping functionality.

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.

Resources