Skip to main content
Glama

extract_image_colors

Read-onlyIdempotent

Extract dominant colors from image RGBA data and return them as JSON, CSS, or palette output, so agents can turn pixel values into usable color schemes.

Instructions

Extract dominant colors from an image. Input should be image data as an array of RGBA values.

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": {
      "imageData": "<imageData>"
    },
    "name": "extract_image_colors"
  }
}

Input Schema

NameRequiredDescriptionDefault
formatNoOutput formatjson
qualityNoExtraction qualitymedium
imageDataYesImage data with RGBA values (at most 65536 pixels; downscale larger images)
maxColorsNoMaximum number of colors to extract

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is fully covered by structured data. The description's only added signal is that the tool consumes raw pixel data rather than a file path or URL, which is genuinely useful for invocation. It omits the documented 65,536-pixel cap and downscaling requirement, so it gives no warning about failure modes.

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?

Two short sentences with the purpose front-loaded and zero filler. The second sentence is partially redundant with the schema but still earns its place as an input-shape warning.

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

Completeness2/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 carries the burden of explaining what comes back, yet it never says the result is a list of colors whose rendering depends on format (json/css/palette). For a tool with a nested object parameter, hard pixel limits, and quality/format knobs, the description is thin relative to the calling complexity.

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; the description adds a slight clarification that the payload is raw RGBA pixel data rather than an image reference. However, it loosely calls the input 'an array of RGBA values' when the schema actually requires an object with data/width/height, and it says nothing about format, quality, or maxColors semantics beyond the schema.

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: 'Extract dominant colors from an image.' An agent can immediately distinguish this from palette-generating siblings. It stops short of naming an alternative such as generate_theme_from_image, so it does not fully earn a 5.

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

Usage Guidelines2/5

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

The description gives no when-to-use guidance, no exclusions, and no pointer to the sibling that derives a theme from an image. Its second sentence is an input-format note rather than routing guidance, so an agent must infer when this tool is the right choice.

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