Skip to main content
Glama

image_extract_colors

Extract dominant colors from images or video frames using K-means clustering. Returns hex codes, RGB values, CSS color names, and coverage percentages.

Instructions

Extract dominant colors from an image or video frame.

Uses K-means clustering to find the most prominent colors. Returns hex codes, RGB values, CSS color names, and percentage coverage.

Args: image_path: Absolute path to the image or video file. If video, extracts a representative frame. n_colors: Number of dominant colors to extract (1-20, default 5).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
image_pathYes
n_colorsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description fully discloses the algorithm (K-means clustering), output types (hex, RGB, CSS names, percentage), and special case for video files. No missing behavioral traits, though it could mention format limitations.

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?

The description is concise with clear sections, though the 'Args' block could be integrated into the narrative. No redundant information, and it front-loads the core function.

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?

Given the output schema (not shown but exists), the description adequately covers inputs and behavior. It addresses video handling and algorithm, though it could note potential file format support.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

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

The input schema has 0% description coverage, so the description compensates fully. It explains image_path as an absolute path with video handling, and n_colors with range (1-20) and default (5), adding significant value beyond the schema.

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 clearly states the tool extracts dominant colors from an image or video frame using K-means clustering. It distinguishes itself from sibling tools like image_generate_palette by specifying extraction rather than generation.

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 does not explicitly state when to use this tool versus alternatives like image_generate_palette or analyze_product. It provides minimal context, only hinting at video frame extraction behavior.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/KyaniteLabs/mcp-video'

If you have feedback or need assistance with the MCP directory API, please join our Discord server