Skip to main content
Glama
iftahs
by iftahs

pixelmath_mask

pixelmath_mask

Evaluates a PixelMath expression on the active image to produce a mask, returning the mask ID for use in PixInsight workflows.

Instructions

Mask from a PixelMath expression evaluated on the view ($T), e.g. 'iif($T>0.2,1,0)'. Returns mask_id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
mask_idNo
rescaleNo
expressionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, so the agent knows this is a write operation. The description adds that evaluation happens on $T and that a mask_id is returned, but it does not explain side effects on the view or whether the existing mask is replaced. With annotations present, the description supplies some behavioral context but not comprehensive details.

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 description is a single sentence with an example, front-loaded with the core operation. It is concise with no redundant words.

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

Completeness2/5

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

With four parameters, two required, and no output schema, the description is incomplete. It omits explanations for 'id' and 'rescale', lacks usage guidance, and does not specify behavioral details beyond the basic creation, so an agent may not be fully equipped to call the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/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 only explains 'expression' with an example and mentions 'mask_id' as output. It does not clarify 'id' or 'rescale', leaving half the parameters undocumented.

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 clearly states the tool creates a mask from a PixelMath expression on the view ($T), with a concrete example. It identifies the resource (mask) and operation (create), but does not explicitly differentiate from sibling mask tools like star_mask or range_mask.

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?

No guidance is provided on when to use this tool versus alternatives such as star_mask or range_mask. The example implies usage, but there is no explicit context, exclusions, or mention of alternative tools.

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