Skip to main content
Glama

convert_color

Convert RGB hex or [r,g,b] colors between a viewer display transform or OCIO colorspace and a target working space using Nuke's OCIO config.

Instructions

Convert an RGB colour with the script's own OCIO config, computed by Nuke. color: "#rrggbb" or [r, g, b]. source "display" (default) means "as it looks on screen through the Viewer's view transform" so the result, put in a Constant, displays as that hex. Otherwise give an OCIO colourspace/role (e.g. "sRGB - Texture" for a plain sRGB-encoded value). target defaults to the working space ("scene_linear").

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": {
      "color": "<color>"
    },
    "name": "convert_color"
  }
}

Input Schema

NameRequiredDescriptionDefault
viewNo
colorYes
sourceNodisplay
targetNoscene_linear
displayNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden. It does disclose that the result depends on the script's OCIO config and the Viewer view transform, which is genuinely useful context, but it never states whether the call mutates script state, what the return value's shape is (hex string versus triplet), or what happens with an unrecognized colourspace or role. Two of the five parameters are never mentioned.

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 conversion statement is front-loaded and each following clause maps to a parameter, so there is little filler. The prose is dense and runs together in one block, which makes it slightly harder to scan than a short bulleted breakdown would be, but nothing is wasted.

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?

With no output schema, the description should say what comes back; it only implies the result is something you can put in a Constant so it renders as the given hex. Combined with the undocumented view and display parameters, an agent would still have to guess at the return type and at how to override the display transform. Adequate for a conversion utility, but not complete.

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 description coverage is 0%, so the description must compensate. It documents color (accepted formats), source (default and semantics), and target (default and meaning), which is solid for three of five parameters. The view and display parameters are not mentioned at all, leaving the display/view-transform path half-explained.

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?

The description opens with a specific verb and resource: convert an RGB colour using the script's own OCIO config, computed by Nuke. That is unambiguous and no sibling tool overlaps in function, so an agent can pick it out of the list. It stops short of an explicit contrast statement, but the purpose itself is clear.

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?

Guidance is given at the parameter level rather than the tool level: use source="display" when the value should look like it does in the Viewer, otherwise pass an OCIO colourspace or role such as "sRGB - Texture". That effectively tells an agent which mode to choose, but there is no statement of when to reach for this tool versus the sibling tooling (e.g. set_knobs or create_node) or of prerequisites.

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