Skip to main content
Glama

Analyze colors & values

analyze

Computes dominant palette, mean luminance, contrast, and value histogram for the composite, a layer, or a region so you can check value structure and color harmony.

Instructions

Dominant palette (k-means), mean luminance, contrast and a value histogram of the composite or a layer/region — for checking value structure and color harmony.

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": "analyze"
  }
}

Input Schema

NameRequiredDescriptionDefault
layerNo
colorsNoPalette size (default 8)
regionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden, and it does disclose the return payload (palette, luminance, contrast, histogram) plus the fact that it operates on the composite by default. It does not state that it is a non-mutating read, nor anything about cost on large images or how the palette count affects results.

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?

A single front-loaded sentence that packs outputs, method, scope, and intent with no filler. It is dense but every phrase contributes; a slightly clearer separation of outputs from scope would push it higher.

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

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 3-parameter tool with a nested region object and no output schema, the description does well by enumerating what comes back. It falls short on region coordinate conventions, luminance/contrast units, and the effect of the palette size argument, which an agent needs to call it 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?

Schema coverage is only 33%: the colors param has a schema note (default 8) and the description ties palette to k-means, and 'composite or a layer/region' implies omission means whole composite. However, the layer parameter has an empty description and the region object's coordinate space and units are never explained in prose.

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?

Names a concrete set of computed outputs (k-means dominant palette, mean luminance, contrast, value histogram) and the target scope (composite, layer, or region), which is far more specific than a generic 'analyze'. It does not explicitly contrast itself with the sibling sample_colors, so differentiation is left partly to inference.

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

Usage Guidelines3/5

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

The trailing clause 'for checking value structure and color harmony' implies the use case, but there is no explicit when-to-use/when-not-to-use guidance and no routing to alternatives such as sample_colors. An agent must infer the decision boundary from the described outputs.

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