Skip to main content
Glama

gradient_background

Replace an image's background with a vertical gradient blending two chosen colors, defined as hex or RGB values, to create clean product or design visuals from a local JPG, PNG, or WEBP file.

Instructions

Replace the background with a vertical gradient from top_color to bottom_color.

Input Schema

NameRequiredDescriptionDefault
top_colorYesColor as hex ('#FF8C00', '#FF8C0080') or RGB(A) ('255, 140, 0' or '255, 140, 0, 255').
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.
bottom_colorYesColor as hex ('#FF8C00', '#FF8C0080') or RGB(A) ('255, 140, 0' or '255, 140, 0, 255').

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 non-read-only, non-destructive, open-world, and there is an output schema for return values. The description adds only the gradient direction, and says nothing about whether the source image is modified vs. a new file written (the schema's output_path default implies a new file, but the word 'Replace' is ambiguous), nor about alpha handling in the colors.

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?

A single front-loaded sentence with no filler; every clause carries meaning. It is arguably too terse for a mutation tool rather than padded, so no penalty for waste.

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?

With annotations, a full schema and an output schema, the remaining gaps are the semantics of alpha in the color values (how transparency composites with the original background) and confirmation that the input file is left intact. Neither is stated, so the definition is minimally adequate rather than complete.

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 formats, size limits and output naming are already documented. The description does contribute one piece of meaning the schema lacks – that top_color maps to the top of the gradient and bottom_color to the bottom – but that alone is a modest addition over the schema baseline.

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?

States a concrete verb+resource ('Replace the background') plus the specific effect ('vertical gradient from top_color to bottom_color'), which implicitly separates it from color_background, blur_background and remove_background. It doesn't name a sibling explicitly, so it stops 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 Guidelines3/5

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

Use is only implied by the operation itself; there is no statement of when to pick this over color_background (solid fill) or when not to use it, and no preconditions such as needing an existing background to replace.

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