Skip to main content
Glama

Snap a mask

ideogram_snap_mask

Snap a hand-drawn mask to the object it marks and save a PNG binary mask. Use white for removal or edits; invert for inpainting.

Instructions

Snap a hand-drawn binary mask to the object it marks: the snapped mask comes back as a PNG (white = the object), saved to the output directory. Use it as is for ideogram_remove_object (white = the region to remove) and for the colorways and material swap masks (white = the region to change); invert it for ideogram_inpaint, whose mask takes black as the region to repaint. The image and the mask as local files or public https URLs. No price quote (the v1 operation offers no dry run).

Input Schema

NameRequiredDescriptionDefault
maskNoThe hand-drawn mask, a local file or a public https URL, the image's size: white (≥ 128) marks the object to snap to
imageNoThe image containing the object, a local file or a public https URL
inline_imagesNotrue: each saved image is also returned as image content (base64; one over 3.75 MB, or past 10 MB in total, by path only), for a client without file access

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.5.0

TDQS

A4.3/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 burden and does disclose meaningful behavior: the result is written to the output directory as a PNG, mask polarity is defined (white ≥ 128), and it explicitly states there is no price quote / no dry run for this v1 operation. It stops short of stating permission requirements, cost, or failure behavior.

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?

The core action and output are front-loaded and every sentence carries information (polarity, downstream consumers, inversion rule, no dry run). The final 'No price quote' sentence is somewhat orphaned and the second sentence is long, but nothing is wasted.

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?

With no output schema and no annotations, the description fills the key gaps: it explains the return artifact (PNG, white = object, saved to output directory) and its intended consumption. Remaining gaps around authorization, cost and error handling are minor for a mask-snapping utility.

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 image, mask and inline_images are already documented in the schema, including the mask's polarity and the inline_images base64/size caveat. The description only restates that inputs may be local files or public https URLs, adding no syntax or format detail beyond the schema.

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 states a specific verb and resource ('snap a hand-drawn binary mask to the object it marks') and immediately characterizes the output (PNG, white = the object, saved to the output directory). It is clearly distinguishable from siblings like ideogram_inpaint and ideogram_remove_object, which it explicitly names as downstream consumers.

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?

It gives explicit routing instructions: use the result as-is for ideogram_remove_object, colorways and material swap (white = region to change), and invert it for ideogram_inpaint (black = region to repaint). This tells the agent exactly when the tool fits and how its output must be transformed for each alternative.

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