Skip to main content
Glama

generate_paint_lab

Start a paid Paint Lab AI action: finish a sketch, edit with words, fill a masked area, color line art without changing the lines, upscale, or remove a background. Uses this month’s generation allowance. Pass quoteId from quote_paint_lab, or the op settings to quote and generate in one call. Poll get_paint_lab_generation until status is completed or failed. A failed job returns its allowance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
opNoAI action: finish (finish a sketch, optional style), edit (edit with words; prompt required), fill (fill the white area of maskAssetId; prompt required), colorize (color line art without changing the lines; optional paletteHex), upscale (2× or 4×), or remove_background (cutout). Required unless quoteId is set.
styleNofinish only. Style id from list_paint_lab_styles (default concept). Does not change the quote.
factorNoupscale only: 2 or 4 (default 2). The result must stay within 4096 × 4096.
promptNoWhat to make or change, up to 2000 characters. Required for edit and fill; optional for finish and colorize; ignored by upscale and remove_background.
qualityNofast or best. finish only (default best). Ignored for other actions.
quoteIdNoQuote id from quote_paint_lab. Optional; when omitted, op is required and this call quotes first.
paletteHexNocolorize only: up to 12 swatches to color with ("Use my swatches"). Does not change the quote.
variationsNoHow many results to make: 1, 2, or 4. finish, edit, and fill only (default 1). One quote covers every variation.
maskAssetIdNoMask generation-asset id, same pixel size as sourceAssetId. White = fill (change), black = keep. Required for fill; optional for edit (limits the change to the white area). Not used by other actions.
sourceAssetIdYesReady image generation-asset id from complete_generation_asset. Use the same image you quoted. For colorize this is the line art (dark lines on a white background).
idempotencyKeyNoOptional request key (8–128 letters, numbers, dots, dashes, colons, or underscores). A quoteId is already single-use: retrying generate with the same quoteId returns the same job and never charges twice.
trainedStyleIdNofinish and edit only. Id of one of your ready trained styles from list_paint_lab_trained_styles. The result is made in that style, and the quote includes it. On generate_paint_lab with quoteId this is ignored: the quote already decides the style.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoSame as generationId.
opNoAI action: finish, edit, fill, colorize, upscale, or remove_background.
errorNoUser-safe failure message when status is failed.
factsNoJob facts line, for example "Finish sketch · Best · 1024 × 1024 · ×2".
styleNoFinish style id, when set.
widthNoSource width in px.
clipIdNoLibrary clip id when the result is saved to the library (upscale).
factorNoUpscale factor, when the action is upscale.
heightNoSource height in px.
promptNoYour own prompt for this job, when one was sent.
statusYessubmitting, queued, running, completed, or failed.
outputsNoOne entry per finished variation: index, public PNG outputUrl, width, and height.
qualityNofast or best, when the action has quality tiers.
refundedNoTrue when a failed job returned its allowance.
createdAtNoISO timestamp when this job was created.
errorCodeNoStable failure code when status is failed.
outputUrlNoPublic PNG URL of the first finished variation.
variationsNoNumber of variations requested.
completedAtNoISO timestamp when this job finished.
outputWidthNoResult width in px.
generationIdYesPaint Lab generation id. Poll get_paint_lab_generation until status is completed or failed.
outputHeightNoResult height in px.
trainedStyleIdNoYour trained style used for this result, when one was applied.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior4/5

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

Adds real behavioral context beyond the annotations: the call is paid and draws down this month's generation allowance, a failed job refunds that allowance, and polling is required after submission. Annotations only declare the generic safety triad, so this cost/refund/polling disclosure is the valuable part, though rate limits and latency are not mentioned.

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?

Four dense sentences, front-loaded with the action and scope, each carrying distinct information (what it does, cost, quoting paths, polling/refund). No filler or repetition.

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 12-parameter paid generation tool with an output schema present, the description covers the essential workflow — quoting, allowance consumption, refunds, and polling — so return-value explanation is rightly delegated to the output schema. It is complete enough to call correctly, with only minor omissions like timeout expectations.

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 coverage is 100%, so the baseline is 3, but the description adds cross-parameter meaning the schema doesn't state on its own: the quoteId-vs-op mutual dependency ('when omitted, op is required and this call quotes first') and the fact that one quote covers every variation and that a quoteId is single-use.

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+resource ('Start a paid Paint Lab AI action') and enumerates the six concrete ops (finish, edit, fill, colorize, upscale, remove_background), which lets an agent distinguish this from siblings like quote_paint_lab and get_paint_lab_generation without opening any schema.

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?

Explicitly routes the agent: pass a quoteId from quote_paint_lab, or supply op settings to quote and generate in one call, then poll get_paint_lab_generation until completed/failed. It names both the upstream and downstream sibling tools and the condition selecting each path.

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