Skip to main content
Glama
iftahs
by iftahs

apply_mask

apply_mask

Attach a mask view to an image window to restrict processing to specific areas. Optionally remove or invert the mask to protect bright regions.

Instructions

Attach (or remove with remove:true) a mask view to an image window; subsequent processes on that view are masked. inverted:true protects where the mask is bright.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
removeNo
mask_idNo
visibleNo
invertedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already indicate a mutating, non-destructive operation. The description adds meaningful behavioral detail: the effect on subsequent processes and the inverted masking semantics. It does not contradict annotations and gives useful context beyond the structured fields.

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 a single, efficient sentence with parenthetical clarifications. It front-loads the core action and adds the inverted behavior without wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the main behavior well, but it omits explicit semantics for visible and the conditions under which mask_id is needed (especially in remove mode). Since there is no output schema and parameters are weakly documented, these gaps leave some ambiguity for correct invocation.

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 0%, so the description must compensate. It explicitly explains remove and inverted, but id, mask_id, and visible are left to inference. While id and mask_id are somewhat inferable from context, visible is not addressed, and the relationship between remove and mask_id is unclear.

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 (attach/remove), a resource (mask view to an image window), and the consequence (subsequent processes are masked). It also distinguishes itself from mask creation siblings like star_mask or range_mask by focusing on applying an existing mask to a window.

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 provides clear operational context: attach a mask view, remove it with remove:true, and use inverted:true to protect bright regions. It does not explicitly name alternatives or state when not to use the tool, but the usage context is clear enough for an agent to select it appropriately.

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