Skip to main content
Glama

Extract and Name Colours from an Image

image_palette
Read-only

Upload an image (base64 encoded) and extract its dominant colour palette, with each colour matched to its nearest named archive entry with full cultural provenance. Uses K-means++ extraction; sRGB pixels are read as D65 CIELAB for matching. Returns up to 5 dominant colours, each with archive name, cultural story, nearest RAL standard, and WCAG accessibility data. Works for product photography, interior photos, artwork, brand assets, and mood boards. The image is never stored; processed in memory only. The result already carries the rendered palette and its PNG, PDF, ASE, JSON and CSS downloads, ready to show the customer. The archive anchors a colour was derived from are evidence, not the recommended colours. A final palette chosen from this evidence is registered with palette_finalize, called once with those exact colours, so the customer can see and download what was actually recommended.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "image_base64": "<image_base64>"
    },
    "name": "image_palette"
  }
}

Input Schema

NameRequiredDescriptionDefault
archiveNoOptional: restrict archive matching to a specific archive
n_coloursNoNumber of dominant colours to extract (default 5, max 5)
media_typeNoImage MIME type e.g. 'image/jpeg'image/jpeg
image_base64YesBase64 encoded image (JPEG, PNG, WebP)

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "description": "Structured JSON response. Shape varies by tool; most return an 'ok' boolean plus a 'result' or 'results' field with the tool's data payload.",
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "error": {
      -      "type": "string"
      -    },
      -    "ok": {
      -      "type": "boolean"
      -    },
      -    "result": {
      -      "type": [
      -        "object",
      -        "array",
      -        "string",
      -        "null"
      -      ]
      -    }
      -  },
      -  "type": "object"
      -}New value: +null
  3. Added

TDQS

A4.1/5.0
Behavior5/5

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

Goes well beyond the readOnlyHint annotation: discloses the K-means++ method, sRGB→D65 CIELAB matching, a 5-colour cap on returns, the exact payload fields per colour (archive name, cultural story, nearest RAL, WCAG data), in-memory processing with no storage, and that exports are already embedded in the result. Consistent with readOnlyHint=true since nothing is persisted.

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?

Front-loaded with the action and the return contents, then usage and workflow. Mostly earning its place, but the penultimate sentence is grammatically tangled ('The archive anchors a colour was derived from are evidence') and the media-type enumeration is slightly listy.

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?

An output schema exists, yet the description still gives enough of the return shape to plan around, plus privacy behaviour and the required follow-up call. For a read-only, fully schema-documented four-parameter tool, 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.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so all four parameters are already documented, including the n_colours default and max of 5. The description reinforces the 5-colour cap and the notion of restricting archive matching, but adds no format, encoding, or size constraints beyond what the schema states. Baseline 3 applies when the schema carries the load.

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 specific verb and resource: upload a base64 image and extract its dominant colour palette, matched to named archive entries with cultural provenance. It also names the downstream sibling (palette_finalize), which helps orientation. It does not distinguish itself from extraction-sounding siblings such as extract_image_colours or palette_extract, so an agent cannot rule those out from text alone.

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?

Gives concrete use contexts (product photography, interiors, artwork, brand assets, mood boards) and a clear workflow rule: the archive anchors are evidence, and the recommended palette is registered once with palette_finalize using those exact colours. No explicit when-not-use or exclusion of the sibling extraction tools, but the sequencing guidance is unusually clear.

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