Skip to main content
Glama

pixelmath_new_image

Apply PixelMath expressions to create a new image from RGB or grayscale formulas referencing open views. Set the output ID and size source to generate the result.

Instructions

Run PixelMath to create a NEW image from expressions that reference other open views by id. Color "rgb" takes red/green/blue expressions; color "gray" takes a single expression. View ids used inside expressions must be simple identifiers (rename_view renames a view). No pow() — use exp(exponent*ln(base)) or the ^ operator.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
redNoRed channel expression (color "rgb")
blueNoBlue channel expression (color "rgb")
colorYes
greenNoGreen channel expression (color "rgb")
symbolsNoPixelMath symbols; constants only, e.g. "k=0.3". Symbols cannot hold images: write image expressions inline.
output_idYesId for the new image
size_fromYesA view whose width and height the new image copies
expressionNoSingle expression for color "gray"

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.1

TDQS

A4.2/5.0
Behavior4/5

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

There are no annotations, so the description carries the full behavioral burden. It discloses non-obvious constraints: expressions reference open views by id, view ids must be simple identifiers, pow() is unsupported and must be replaced via exp(ln()) or ^, and symbols can only be constants. This goes well beyond a generic 'run PixelMath' statement.

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?

Four concise sentences, with the core purpose and key distinction front-loaded. Every sentence adds value: color behavior, identifier rules, and a math workaround. There is no filler or repetition of the input schema.

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 8-parameter tool with no annotations and no output schema, the description covers the essential operational constraints and parameter relationships. It does not explain what happens on output_id conflicts or whether the new image becomes active, but the schema already documents the individual parameters, so the description is reasonably complete.

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 already high at 88%, so the baseline is 3. The description adds meaningful parameter-level semantics by tying the color enum to which expression parameters are expected (red/green/blue vs single expression) and by giving expression-syntax constraints that are not present in 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 opens with a specific verb and resource: 'Run PixelMath to create a NEW image from expressions that reference other open views by id.' It clearly distinguishes this tool from siblings like run_pixelmath by emphasizing the new-image behavior, and it specifies the color-mode options (rgb vs gray).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description makes the creation-focused use case clear and gives practical guidance about expression identifiers and color modes. However, it never explicitly names an alternative tool (such as run_pixelmath) or states when NOT to use this tool, leaving the selection decision partly to inference.

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