Skip to main content
Glama

Extract Dominant Palette Colours

palette_extract
Read-only

Extract dominant colours from an image using k-means++ clustering. Accepts a public image URL or base64-encoded image. Returns hex values with proportional weights sorted by luminance. Optionally runs palette_analyse on the results. Use this instead of image_palette when you need hex values with proportions for palette_analyse or palette_swatch. The result already carries the rendered palette and its PNG, PDF, ASE, JSON and CSS downloads -- show them to the customer. Never present the archive anchors a colour was derived from as the colours you are recommending. If you go on to choose a final palette OF YOUR OWN from this evidence, call palette_finalize once with those exact colours so the customer can see and download what you actually recommended.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kNoNumber of colours to extract (3-12, default 6)
analyseNoIf true, also run palette_analyse on the extracted colours and return archive names
archiveNoExplicit single archive name to restrict matching to e.g. 'MarsColour', 'Japan', 'Victorian'.
image_idNoEphemeral image_id from ingest_image (preferred for images over 50 KB)
image_urlNoPublic URL of the image to extract colours from
image_base64NoBase64-encoded image data (small images only, under 50 KB)
grey_card_hexNoHex value sampled from a grey or white card in the image for white balance correction e.g. #C8C8C8
style_contextNoPlain English style description that restricts archive matching to a coherent set e.g. 'English cottage garden', 'Victorian', 'Japanese', 'MarsColour', 'Arts and Crafts'. Prevents palette colours from being named across unrelated archives.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

TDQS

A4.7/5.0
Behavior5/5

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

Even though readOnlyHint is already true, the description adds substantial behavioral context beyond the annotation: k-means++ clustering, luminance-sorted output, the optional palette_analyse behavior, the rendered palette with PNG/PDF/ASE/JSON/CSS downloads, and a warning not to present archive anchors as recommended colours. No annotation contradiction exists.

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?

The description is front-loaded with the core purpose, then covers inputs, output, sibling distinction, and downstream workflow rules in five dense sentences. Every sentence earns its place; there is no fluff, repetition, or irrelevant detail.

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?

Given the rich input schema and existing output schema, the description is more than complete: it explains accepted input formats, output characteristics, when to pick this tool over image_palette, how to use the result with palette_analyse, and how to finalize a recommended palette. Nothing essential for correct invocation 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 description coverage is 100%, so the input schema already documents all 8 parameters in detail. The description adds only general input guidance ('Accepts a public image URL or base64-encoded image') and the optional analyse behavior, but no additional parameter-level meaning beyond what the schema provides. Baseline 3 is appropriate.

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 states a specific verb and resource ('Extract dominant colours from an image'), names the algorithm (k-means++ clustering), and defines the output (hex values with proportional weights sorted by luminance). It also distinguishes itself from image_palette by specifying when palette_extract is the right choice, so an agent can tell it apart from its siblings.

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

Usage Guidelines5/5

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

The description explicitly says 'Use this instead of image_palette when you need hex values with proportions for palette_analyse or palette_swatch', giving a concrete selection rule. It also provides downstream usage guidance about when to call palette_finalize if the agent chooses its own final palette, which is valuable routing information.

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.

TDQS

A3.7/5.0
Disambiguation2/5

Multiple tool clusters have unclear boundaries: colour_passport, colour_dna, colour_metrics, and colour_cultural_risk overlap heavily; palette_extract, extract_image_colours, image_palette, and ingest_image cover similar image-colour extraction territory; and compound tools like design_session, image_brief, session_brief, and archive_report_brief duplicate chains of component tools. The descriptions are detailed and occasionally state 'use this instead of X', but an agent still faces many near-duplicate choices.

Naming Consistency3/5

Names are consistently snake_case and often use domain prefixes (colour_, palette_, archive_, brand_, accessibility_), but verb placement is mixed: some are verb_noun (extract_image_colours, query_hex, style_match), others are noun_verb (colour_dna, palette_generate, brand_audit), and a few standalone names (ui_states, tool_guide, meta_capabilities) don't fit either pattern. The convention is readable but not uniform.

Tool Count1/5

At 88 tools, this is far beyond the reasonable well-scoped range and exceeds the 50+ extreme mismatch threshold. Many tools are compound wrappers that consolidate chains of simpler tools, adding redundancy and cognitive load rather than genuine coverage.

Completeness5/5

For the apparent domain, the tool surface is extremely comprehensive: colour extraction, analysis, naming, accessibility, cultural/provenance research, palette generation, brand systems, interior design, ecommerce copy, image briefs, project lifecycle, exports, and diagnostic tools are all present. Persistent objects have list/get/versions/delete/export support, so there are no obvious dead ends.

Resources