Skip to main content
Glama

Extract Colours from Image

extract_image_colours
Read-only

Extract dominant colours from a photograph using Colour Memory's proprietary k-means++ algorithm. Requires either a public image_url, or an image_id. A raw uploaded file with no public URL (e.g. a local file path or a ChatGPT file attachment without a usable download_url) is accepted as an image_id from ingest_image. Returns hex values with proportional weights. Optionally matches colours against the archive with style_context for coherent cultural naming. Its output feeds image_brief for an uploaded photograph.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "extract_image_colours"
  }
}

Input Schema

NameRequiredDescriptionDefault
kNoNumber of colours to extract (3-12, default 6)
imageNoImage file attachment from ChatGPT
analyseNoIf true, match colours against archive and return names
image_idNoEphemeral image_id returned by ingest_image. Covers a local file path or raw file attachment with no public URL.
image_urlNoPublic URL of image
grey_card_hexNoHex from a grey/white card for white balance
style_contextNoe.g. English cottage garden, Victorian, Japanese

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / image_id / description
      Previous value: -"Ephemeral image_id returned by ingest_image. Use this if you only have a local file path or raw file attachment with no public URL."New value: +"Ephemeral image_id returned by ingest_image. Covers a local file path or raw file attachment with no public URL."
  2. Added
  3. Removed
  4. Changed1 schema field changed
    • addedInput schema / properties / image_id
      Added value: +{
      +  "description": "Ephemeral image_id returned by ingest_image. Use this if you only have a local file path or raw file attachment with no public URL.",
      +  "type": "string"
      +}
  5. Added

TDQS

A3.9/5.0
Behavior4/5

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

Beyond readOnlyHint=true the description discloses the return shape ('hex values with proportional weights') and that style_context optionally triggers archive matching to produce cultural names — useful behavioural detail the annotations cannot convey. It does not cover failure modes, such as what happens if neither or both of image_url/image_id are supplied.

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?

Four dense sentences with the input requirement front-loaded right after the purpose; nothing is filler. The sentence about raw uploaded files is convoluted ('is accepted as an image_id from ingest_image') and costs more parsing effort than it should.

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?

For a 7-parameter tool with a nested file object and an output schema, the description covers inputs, optional analysis, and the downstream consumer well enough to call it correctly. Remaining gaps — precedence when both image_url and image_id are given, and whether style_context requires analyse — are modest against the rich schema.

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 baseline is 3 and the schema already documents k, image, and grey_card_hex. The description only adds interpretation for two fields — that image_id is an ephemeral handle from ingest_image and that style_context drives coherent cultural naming — while k, analyse, and grey_card_hex get no extra meaning.

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 concrete verb and resource ('Extract dominant colours from a photograph') and even names the algorithm, so the operation is unambiguous. It does not distinguish itself from similarly-named siblings such as palette_extract or image_palette, leaving the agent to infer the difference.

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?

Explicitly states the input preconditions ('Requires either a public image_url, or an image_id') and covers the awkward case of a raw attachment with no download_url, plus the downstream hand-off to image_brief. It stops short of saying when to prefer this over the palette siblings, so there is context but no exclusions.

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