Skip to main content
Glama

inpaint_image_pro_flash

Repaint only the white-masked parts of an image using a text description, while keeping all unmasked pixels unchanged. Provide a source image, black/white mask, and prompt to generate the new content.

Instructions

Pro Flash inpainting: replace only the WHITE pixels of mask_image, preserving unmasked RGBA exactly. Source and mask must share identical supported native dimensions; mask RGB must be pure black/white (alpha is ignored) and may not be empty. output_method controls whether you get the full composite or only the changed pixels (transparent elsewhere). An optional context_image requires its bounding_box in the source. Runs as a background job.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seedNoRecorded seed (default 0); the Pro Flash provider does not promise deterministic output
imageYesSource image at a supported native size
mask_imageYesBlack/white mask, same size as image; white = repaint
project_idNoOptional project ID to file the result under
descriptionYesWhat to paint into the masked region (max 2000 chars)
bounding_boxNoWhere context_image sits in the source (required when context_image is given)
crop_to_maskNoCrop the working region to the mask bounds (default true)
context_imageNoOptional native-size context image; requires bounding_box
no_backgroundNoReturn on a transparent background (default false)
output_methodNo'Modify current layer' returns the full composite (default); the other two return only the changed pixels, transparent outside the mask
background_removal_taskNoBackground removal complexity when no_background is set (default remove_simple_background)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.8.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden. It discloses async execution via 'Runs as a background job,' the exact pixel-selection rule, mask purity requirements, alpha handling, and output_method behavior. It leaves the concrete job-result format unspecified, but the behavioral core is well covered.

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?

The description is dense but efficiently structured: core behavior first, then constraints, then output modes, then optional inputs, then execution model. Every sentence contributes a distinct, non-redundant fact, and nothing is padded.

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 an 11-parameter tool with nested objects and no output schema, the description covers the essential constraints needed to invoke it correctly: mask semantics, dimension matching, context_image placement, output_method, and background-job execution. The main gap is that it does not describe the job result shape or how to retrieve the finished image, though the sibling get_job_status tool implies that workflow.

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. The description adds useful semantic compression by clarifying that white mask pixels are repainted, alpha is ignored, and output_method distinguishes full composite from changed-pixels-only output. It also reinforces the context_image/bounding_box relationship beyond the schema's bare wording.

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?

The description opens with a specific verb and resource: 'replace only the WHITE pixels of mask_image, preserving unmasked RGBA exactly.' This precisely distinguishes inpainting behavior from generic image editing and from the many sibling image tools. The addition of output_method semantics further disambiguates what the tool returns.

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 gives clear operating context: identical dimensions, pure black/white mask, alpha ignored, non-empty mask, optional context_image requiring bounding_box, and background execution. It does not explicitly name alternatives like inpaint, inpaint_v3, or edit_image_pro_flash, but the constraints make the intended use case clear.

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

Deploy Server

Other Tools