Skip to main content
Glama

Image Resize & Convert Tools (Tanod)

image_colors

Read-onlyIdempotent

imagepeek: Extract the dominant colours of an image. For a placeholder string use image_blurhash. Returns an image's palette of k colours (hex, rgb, share), the dominant one and the average colour with its luminance, from a 200 px sample (median cut refined by k-means; transparent pixels ignored). Reads PNG, JPEG, WebP, GIF, TIFF, BMP, ICO and AVIF; other formats and images over 40 megapixels are refused (not charged). Images are never logged or stored. Typically 0.5-2 s. Price: USD 0.002. Free: 3 imagepeek calls per IP per UTC day. Docs: https://tanod.dev/learn/image-color-palette-api.html

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

Input Schema

NameRequiredDescriptionDefault
kNoPalette size.
urlNoPublic http(s) URL of the image (at most 10 MB; private, internal and IP-literal hosts are refused); or use image_base64.
auto_orientNoApply the EXIF orientation first.
image_base64NoThe image as standard or url-safe base64 (at most 10 MB decoded; a data:image/...;base64, prefix is fine); or use url.

Output Schema

NameRequiredDescriptionDefault
errorNoOnly on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object.
inputNo
notesNo
sourceNo
averageNo
paletteNo
dominantNo
final_urlNo
operationNo
source_urlNo
pixels_sampledNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed14 schema fields changed
    • changedInput schema / properties / auto_orient / description
      Previous value: -"Apply the EXIF orientation first (default true)."New value: +"Apply the EXIF orientation first."
    • removedInput schema / properties / auto_orient / title
      Removed value: -"Auto Orient"
    • removedInput schema / properties / image_base64 / default
      Removed value: -null
    • removedInput schema / properties / image_base64 / title
      Removed value: -"Image Base64"
    • changedInput schema / properties / k / description
      Previous value: -"Palette size (1-10, default 5)."New value: +"Palette size."
    • removedInput schema / properties / k / title
      Removed value: -"K"
    • removedInput schema / properties / url / default
      Removed value: -null
    • removedInput schema / properties / url / title
      Removed value: -"Url"
    • removedInput schema / title
      Removed value: -"image_colorsArguments"
    • removedOutput schema / properties / average / properties
      Removed value: -{
      -  "hex": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "luminance": {
      -    "type": [
      -      "number",
      -      "null"
      -    ]
      -  },
      -  "rgb": {
      -    "items": {
      -      "type": [
      -        "integer",
      -        "null"
      -      ]
      -    },
      -    "type": [
      -      "array",
      -      "null"
      -    ]
      -  },
      -  "share": {
      -    "type": [
      -      "number",
      -      "null"
      -    ]
      -  }
      -}
    • removedOutput schema / properties / dominant / properties
      Removed value: -{
      -  "hex": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "luminance": {
      -    "type": [
      -      "number",
      -      "null"
      -    ]
      -  },
      -  "rgb": {
      -    "items": {
      -      "type": [
      -        "integer",
      -        "null"
      -      ]
      -    },
      -    "type": [
      -      "array",
      -      "null"
      -    ]
      -  },
      -  "share": {
      -    "type": [
      -      "number",
      -      "null"
      -    ]
      -  }
      -}
    • removedOutput schema / properties / input / properties
      Removed value: -{
      -  "animated": {
      -    "type": [
      -      "boolean",
      -      "null"
      -    ]
      -  },
      -  "bytes": {
      -    "type": [
      -      "integer",
      -      "null"
      -    ]
      -  },
      -  "format": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "frames": {
      -    "type": [
      -      "integer",
      -      "null"
      -    ]
      -  },
      -  "has_alpha": {
      -    "type": [
      -      "boolean",
      -      "null"
      -    ]
      -  },
      -  "height": {
      -    "type": [
      -      "integer",
      -      "null"
      -    ]
      -  },
      -  "width": {
      -    "type": [
      -      "integer",
      -      "null"
      -    ]
      -  }
      -}
    • removedOutput schema / properties / notes / items
      Removed value: -{
      -  "type": [
      -    "string",
      -    "null"
      -  ]
      -}
    • removedOutput schema / properties / palette / items
      Removed value: -{
      -  "properties": {
      -    "hex": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "luminance": {
      -      "type": [
      -        "number",
      -        "null"
      -      ]
      -    },
      -    "rgb": {
      -      "items": {
      -        "type": [
      -          "integer",
      -          "null"
      -        ]
      -      },
      -      "type": [
      -        "array",
      -        "null"
      -      ]
      -    },
      -    "share": {
      -      "type": [
      -        "number",
      -        "null"
      -      ]
      -    }
      -  },
      -  "type": [
      -    "object",
      -    "null"
      -  ]
      -}
  2. Changed3 schema fields changed
    • addedInput schema / properties / auto_orient / description
      Added value: +"Apply the EXIF orientation first (default true)."
    • changedInput schema / properties / url / description
      Previous value: -"Public http(s) URL of the image (at most 10 MB); or use image_base64."New value: +"Public http(s) URL of the image (at most 10 MB; private, internal and IP-literal hosts are refused); or use image_base64."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "average": {
      +      "properties": {
      +        "hex": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "luminance": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "rgb": {
      +          "items": {
      +            "type": [
      +              "integer",
      +              "null"
      +            ]
      +          },
      +          "type": [
      +            "array",
      +            "null"
      +          ]
      +        },
      +        "share": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        }
      +      },
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "dominant": {
      +      "properties": {
      +        "hex": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "luminance": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "rgb": {
      +          "items": {
      +            "type": [
      +              "integer",
      +              "null"
      +            ]
      +          },
      +          "type": [
      +            "array",
      +            "null"
      +          ]
      +        },
      +        "share": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        }
      +      },
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "error": {
      +      "description": "Only on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object."
      +    },
      +    "final_url": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "input": {
      +      "properties": {
      +        "animated": {
      +          "type": [
      +            "boolean",
      +            "null"
      +          ]
      +        },
      +        "bytes": {
      +          "type": [
      +            "integer",
      +            "null"
      +          ]
      +        },
      +        "format": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "frames": {
      +          "type": [
      +            "integer",
      +            "null"
      +          ]
      +        },
      +        "has_alpha": {
      +          "type": [
      +            "boolean",
      +            "null"
      +          ]
      +        },
      +        "height": {
      +          "type": [
      +            "integer",
      +            "null"
      +          ]
      +        },
      +        "width": {
      +          "type": [
      +            "integer",
      +            "null"
      +          ]
      +        }
      +      },
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "notes": {
      +      "items": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "type": [
      +        "array",
      +        "null"
      +      ]
      +    },
      +    "operation": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "palette": {
      +      "items": {
      +        "properties": {
      +          "hex": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "luminance": {
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "rgb": {
      +            "items": {
      +              "type": [
      +                "integer",
      +                "null"
      +              ]
      +            },
      +            "type": [
      +              "array",
      +              "null"
      +            ]
      +          },
      +          "share": {
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          }
      +        },
      +        "type": [
      +          "object",
      +          "null"
      +        ]
      +      },
      +      "type": [
      +        "array",
      +        "null"
      +      ]
      +    },
      +    "pixels_sampled": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "source": {
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "source_url": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
  3. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent annotations: it discloses the sampling method (200 px, median cut refined by k-means, transparent pixels ignored), refusal policy for oversized/unsupported images being not charged, a no-logging/no-storage privacy guarantee, typical latency, price, and the free-tier quota per IP per UTC day.

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?

Front-loaded with purpose and the sibling alternative, then packed with operational detail in a dense but readable single block. Some parenthetical algorithm detail and the docs link are arguably surplus for tool selection, but nothing is genuinely wasted.

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?

An output schema exists, yet the description still sketches the return shape (hex, rgb, share, dominant and average colour with luminance). Combined with format, size, cost, latency, and quota disclosure, an agent has everything needed to decide and call 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 100%, so the baseline is 3; the description adds only light context, clarifying that k drives palette size and that results derive from a downsampled image, which implies limited precision. It does not explain auto_orient or the url vs image_base64 exclusivity beyond what the schema states.

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?

States a specific verb and resource ("Extract the dominant colours of an image") and explicitly distinguishes itself from the sibling image_blurhash for the placeholder use case. An agent can identify the tool's job without opening the schema.

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?

Gives a clear routing rule ("For a placeholder string use image_blurhash") and defines the accepted input space: PNG/JPEG/WebP/GIF/TIFF/BMP/ICO/AVIF, with other formats and images over 40 megapixels refused. It does not cover when to prefer this over colour-adjacent siblings such as image_metadata, but the essential alternative is named.

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.