Skip to main content
Glama

create_mask

Generates a black-and-white subject mask for an image, marking the subject in white and the background in black. Use it to isolate subjects for background removal, replacement, or compositing.

Instructions

Create a black-and-white subject mask (white = subject, black = background) for an image.

Input Schema

NameRequiredDescriptionDefault
modelNoSegmentation model. 'falcon' is the default and works well for most images.falcon
image_pathYesPath to a local JPG, PNG, WEBP, BMP or GIF image (1 KB to 10 MB).
output_pathNoWhere to save the result. Defaults to '<name>_<operation>.<ext>' next to the input image.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare that this is a non-read-only, non-destructive, non-idempotent, open-world operation. The description adds the useful output convention (white subject, black background), but does not disclose file-writing behavior, overwrite semantics, or what happens when the model fails to find a subject.

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?

A single front-loaded sentence that conveys the action, the output type, and the color convention without any redundant or filler text.

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?

Given the simple three-parameter schema with full descriptions, existing output schema, and annotations covering safety and mutability, the description is nearly complete for correct invocation. Its main gap is the lack of sibling differentiation, which is primarily a usage-guidance concern.

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 three parameters are fully documented in the schema. The description adds no parameter-specific detail beyond the image-level output convention, so the baseline of 3 is appropriate.

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?

The description states a specific verb and resource ('Create a black-and-white subject mask') and defines the output convention (white = subject, black = background), which clearly distinguishes it from sibling background-editing tools. It does not explicitly contrast itself with alternatives like remove_background, so it falls short of a 5.

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?

It says what the tool does but gives no when-to-use guidance, no exclusions, and no mention of when an agent should choose create_mask over remove_background, blur_background, or other sibling tools. The usage context is only implied by the tool name and output definition.

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