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?

Annotations only say readOnlyHint, but the description discloses optional invocation of palette_analyse, the delivery format (PNG, PDF, ASE, JSON, CSS), and the important semantic warning not to present archive anchors as recommendations. It also states the finalize-if-own-choice behavior. No contradiction with readOnlyHint.

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?

Although longer than average, every sentence carries operational value: input, output, alternative selection, result display, and post-processing. It is front-loaded with the core extraction purpose. This density and structure justify a top score.

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?

The description covers input modes, return format, optional chaining to palette_analyse, display expectations, and the required finalization step if the agent forms its own palette. The output schema and 100% parameter documentation cover the remaining details. An agent has what it needs to call the tool correctly.

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?

All 8 parameters are already documented in the schema (100% coverage), so the baseline 3 applies. The description mainly repeats URL/base64 acceptance and adds algorithm context (k-means++), but does not add significant parameter-specific semantics beyond the schema. Thus no higher than baseline.

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: 'Extract dominant colours from an image using k-means++ clustering' and explains the output (hex values with proportional weights sorted by luminance). It explicitly differentiates itself from image_palette by stating when this tool is preferred. This is enough to distinguish it from siblings such as palette_analyse and palette_swatch.

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?

Provides an explicit 'Use this instead of image_palette when...' condition tied to palette_analyse/palette_swatch, and gives clear downstream instructions (call palette_finalize after choosing a final palette). It covers when the tool's output should be shown to the customer. This is more than most tool descriptions offer.

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.6/5.0
Disambiguation2/5

Several tool clusters perform near-identical functions: extract_image_colours, image_palette and palette_extract all extract dominant colours from images; colour_passport, colour_dna, colour_metrics and colour_cultural_risk all profile a single hex; and at least six compound 'complete package' tools (agent_brief, archive_report_brief, brand_report, design_session, image_brief, session_brief) overlap heavily in scope. The descriptions try to differentiate -- some even point to tool_guide for routing -- but the volume and similarity of clusters makes misselection likely.

Naming Consistency4/5

The vast majority of tools follow a clear domain_prefix_suffix pattern (colour_, palette_, archive_, brand_, accessibility_, project_) and within families naming is very disciplined (brand_guideline_specify/select/pdf/claims/status, project_get/list/versions/delete). However, a handful of outliers invert the order (extract_image_colours, ingest_image, render_colour_result, query_hex) and some descriptions reference tools that don't exist as endpoints (palette_from_concept, match_paint_system, get_colour_metrics).

Tool Count1/5

88 tools is far beyond any reasonable single-server surface, even for a platform spanning archives, branding, interiors and accessibility. The sheer number forces agents into a massive decision space, and many tools exist purely as convenience wrappers that replace chains of 3-6 other tools, suggesting aggressive consolidation was needed.

Completeness4/5

The surface covers an unusually broad domain -- archive search, colour science, palettes, branding, interiors, accessibility, image extraction, projects, and PDF/Word/Excel exports -- with very few dead ends for end-user workflows. Minor gaps: several compound-tool descriptions reference tools that no longer exist, and valid archive names are only discoverable via error messages rather than a dedicated listing endpoint.

Resources