Skip to main content
Glama

Generate Palette Swatch Image

palette_swatch
Read-only

Generate a clean, text-free PNG swatch image from hex colours. Returns a URL to the PNG. Use for Midjourney --sref style references or design mood boards. Supports photo-proportional weights from palette extraction, equal distribution, grid layout, a true smooth LCh-interpolated gradient (no hard colour edges, best for mood/atmosphere/colour-grade references rather than literal composition), and 13 fixed design ratios (6310, 7020, triptych, quad, filmstrip, etc.).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hNoOutput height in pixels (default 630)
wNoOutput width in pixels (default 1200)
hexesYesComma-separated hex values e.g. #d4a829,#1a5c6e,#0a0a0b
layoutNophoto | equal | grid | gradient | filmstrip | 6310 | 7020 | 5030 | 8010 | 5050 | 6040 | triptych | quad | 55-25-20 | quint | 70-10-20 | 40-30-20-10 | 33-33-24-10. gradient is a true smooth perceptual blend with no hard edges, unlike every other layout here.
weightsNoComma-separated proportional weights from k-means extraction. Used only when layout=photo.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / layout / description
      Previous value: -"photo | equal | grid | filmstrip | 6310 | 7020 | 5030 | 8010 | 5050 | 6040 | triptych | quad | 55-25-20 | quint | 70-10-20 | 40-30-20-10 | 33-33-24-10"New value: +"photo | equal | grid | gradient | filmstrip | 6310 | 7020 | 5030 | 8010 | 5050 | 6040 | triptych | quad | 55-25-20 | quint | 70-10-20 | 40-30-20-10 | 33-33-24-10. gradient is a true smooth perceptual blend with no hard edges, unlike every other layout here."
  2. Added

TDQS

A4.3/5.0
Behavior4/5

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

With readOnlyHint=true annotation, the description aligns (generating an image is non-mutating). It adds valuable behavioral detail: the output is text-free, gradient uses true smooth LCh interpolation with no hard edges, and the photo layout relies on proportional weights from palette extraction. No contradiction with annotations.

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 well-structured: purpose first, then usage, then feature list. It is packed with information in a compact form, though the final sentence lists many layout types and parentheticals, making it slightly dense. Every sentence earns its place as it covers purpose, use, and key distinctions.

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 tool's complexity (5 params, many layout options), the description covers the core functionality, use cases, and unique gradient behavior. It mentions the return of a URL and the photo-only weights. With an output schema present, not explaining return values is acceptable. It could mention default dimensions but schema covers that.

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 100%, so the baseline is 3. The description adds meaning beyond the schema by explaining the gradient layout's unique behavior ('true smooth perceptual blend with no hard edges, unlike every other layout here') and clarifying that weights are used only with 'layout=photo.' This enriches parameter understanding.

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: 'Generate a clean, text-free PNG swatch image from hex colours.' It clearly states the output (URL to PNG) and differentiates from sibling tools by emphasizing the swatch generation and layout features. This is more specific than generic palette tools.

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 gives explicit use cases: 'Use for Midjourney --sref style references or design mood boards.' It also provides context for the gradient layout, noting it is 'best for mood/atmosphere/colour-grade references rather than literal composition,' which implies when not to use it. It names no alternative tools directly but the use-case guidance is strong.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources