Skip to main content
Glama

hex-to-rgb

Read-onlyIdempotent

Convert a hex color (e.g. #ff8800) to RGB and RGBA channel values. Accepts 3-, 4-, 6-, and 8-digit hex with or without the leading #.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hexYesHex color string. Accepts #RGB, #RGBA, #RRGGBB, #RRGGBBAA, or the same forms without the leading #.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYesAlpha channel (0-1, defaults to 1 if not present in input).
bYesBlue channel (0-255).
gYesGreen channel (0-255).
rYesRed channel (0-255).
rgbYesCSS rgb() string.
rgbaYesCSS rgba() string.
hex_normalizedYesNormalized 6-digit hex string with leading #.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare the tool read-only, idempotent, and non-destructive. The description adds useful behavioral details about accepted hex formats and optional # prefix, which goes beyond the annotations and clarifies handling of different input shapes. No contradiction exists.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is only two sentences, front-loads the core action, and provides a concrete example followed by accepted input variations. Every sentence earns its place with no redundant filler.

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?

For a simple conversion tool with full parameter schema coverage and an output schema present, the description adequately specifies input constraints and output purpose. It supports the annotations and leaves no critical gap for a straightforward pure function.

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?

The schema description of the hex parameter fully covers accepted formats (#RGB, #RGBA, #RRGGBB, #RRGGBBAA, with/without #). The tool description adds an example and reiterates the format set, but provides no additional semantic meaning beyond the schema, so the baseline score of 3 is appropriate.

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 converts hex colors to RGB and RGBA channel values, with a concrete example. It specifies accepted input formats (3-, 4-, 6-, and 8-digit hex with or without #), making it distinct from a broader color-converter sibling.

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 description implies usage (when you have a hex color and need RGB/RGBA values) but does not directly compare against alternatives like color-converter. There is no explicit when-to-use or exclusion guidance, leaving the agent to infer the appropriate context.

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