Skip to main content
Glama

Image palette

image_palette

Extract the dominant colours from an image as JSON: up to 12 hex values, most common first, each with its share and neutrality flag. Paid per call in USDC.

Instructions

Returns the colours one image is mostly made of, as JSON: up to count colours, most common first, each a hex value with its share of the image and whether it is a neutral. Costs 0.01 USDC per call (real money) on Base, paid from the buyer's wallet over x402 after the buyer's spending limits are checked. Input: PNG, JPEG, WEBP, up to 8 MB, at most 4096 px. Give exactly one of image_url or image_path. Output: JSON, returned in the tool result.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNoThe most colours to return.
save_toNoOptional local file path to save the result to (JSON).
image_urlNoA public https URL of the image.
overwriteNoReplace save_to if it exists. Default false.
image_pathNoA local image file to send (read by this server, sent base64).
allow_repeatNoBuy again even if the same request was bought in the last 10 minutes. Default false: the earlier result is returned and nothing is charged.
max_price_usdcNoOptional: refuse if Bacon asks more than this, in USDC.
include_neutralsNoCount near-whites, near-blacks and greys too.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Adds substantial context beyond the annotations: a fixed 0.01 USDC real-money charge on Base, the x402 payment path, that spending limits are checked before charging, accepted formats and size/pixel caps, and the 10-minute dedup behavior that returns a prior result without charging. This also explains why readOnlyHint is false for a non-mutating tool.

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?

Front-loaded with the purpose, then cost, then input constraints, then output format. Four dense sentences with no filler; each clause carries a fact the agent needs.

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

Completeness5/5

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

With no output schema, the description still tells the agent what comes back (JSON with hex values, share, neutral flag), how it is delivered (tool result), what the call costs, and the input constraints. Nothing an agent needs to invoke it correctly is missing.

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 description coverage is 100%, so the baseline is 3, but the description adds meaning the schema lacks: the returned colours are the most common first, capped by count, and each carries its share and a neutral flag, which ties the output back to include_neutrals. That is modest but real added value over 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?

States a specific verb and resource ('Returns the colours one image is mostly made of'), and the schema/description together make it clearly distinct from sibling image tools like remove_background, optimize_image and brand_from_url. An agent can tell what this tool produces without inspecting anything else.

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?

It gives operational constraints ('Give exactly one of image_url or image_path') and discloses cost, but never says when to prefer this tool over siblings or in what scenario it is appropriate. Usage is implied by the description of what it returns rather than explicitly guided.

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