Tools reference

All 22 Hypercolor MCP tools: arguments, defaults, enums, read-only and idempotency flags, and a worked call for each.

The Hypercolor MCP server exposes 22 tools, the verbs an agent uses to read and reshape the lighting state. This page is the authoritative reference: every tool’s arguments, defaults, enums, annotations, and a worked call. All facts here are pulled from the daemon source in crates/hypercolor-daemon/src/mcp/tools/, not paraphrased.

The MCP server is off by default. Until you enable it in config, http://127.0.0.1:9420/mcp returns 404. Turn it on first in MCP setup, then come back here.

If you have not met the three-primitive model yet, start at the Agents & MCP overview. Tools are one of the three primitives; the others are resources (browsable state) and prompt templates (guided flows).

#How tools are annotated 🎯

Every tool carries four annotations the daemon reports to MCP clients.

AnnotationMeaning
read_onlyThe tool only reads state and never mutates it. Most clients skip the confirmation dialog for read-only tools.
idempotentRepeating the call with the same arguments lands on the same state. Safe to retry.
destructiveThe tool overwrites state you cannot get back. Reported per tool, not as a blanket value.
open_worldAlways false; the tool set is closed and known.

Of the 22 tools, 11 are read-only: get_status, list_effects, get_devices, get_audio_state, get_sensor_data, list_scenes, get_layout, diagnose, openrgb_status, get_effect_console, and capture_canvas. The other 11 mutate state. Seven tools are non-idempotent: set_effect, set_color, and add_layer mint fresh layer identities, create_scene mints a scene, set_display_face replaces an assignment, install_effect restarts the running page and returns a new console cursor, and capture_canvas returns a new frame on every call even though it changes nothing.

Six of the eleven mutating tools are destructive: set_effect, set_color, clear_zone, activate_scene, and set_display_face each discard state the caller did not supply and cannot recover, and install_effect overwrites any installed page that shares its file name. The other five are not: set_brightness and set_output_power are reversible value writes, adjust_controls patches named values and bindings, and create_scene and add_layer only add.

Read-then-act is the through-line. The server’s own instructions tell every client to call get_status or read hypercolor://state before making changes, to call list_effects before applying visuals, and to call capture_canvas after a change instead of assuming it looks right. Follow that order and your calls land predictably.

#Errors and the call envelope

Tool calls return a structured JSON payload on success. On failure they return a structured error object with a JSON-RPC code, message, and details when the caller can act on them:

{
  "code": -32602,
  "message": "invalid parameter 'query': selector 'aur' is ambiguous",
  "details": {
    "kind": "ambiguous",
    "parameter": "query",
    "query": "aur",
    "candidates": [
      { "id": "aurora", "name": "Aurora" },
      { "id": "aurora-rain", "name": "Aurora Rain" }
    ]
  }
}

The code maps from the daemon’s ToolError type:

CodeCondition
-32601Tool name not found
-32602Missing or invalid parameter
-32000State conflict (the current state rejects the mutation)
-32603Internal execution error

Every tool declares a typed output schema, and the daemon validates each result against it before answering. A handler that produced anything else would return an internal error rather than an unexpected shape, so the shapes below are the contract.

Named resources use one deterministic selector policy: exact serialized ID, exact case-insensitive name, then a unique case-insensitive name substring. No match and ambiguous substrings return structured candidate details. Candidates are sorted by lowercase name, original name, then ID. Unnamed layers resolve by ID only. The color parser is separate and still accepts CSS forms and natural-language color descriptions.


#Effects

#set_effect

Replace the primary zone’s whole-zone layers with one lighting effect. Layers limited to some of the zone’s outputs (see add_layer) stay above the new layer, so changing the base effect keeps a keyboard’s own layer. The query argument resolves by exact effect ID, exact case-insensitive name, or a unique case-insensitive name substring. Use list_effects before applying when the catalog name is unknown.

  • Mutates state. read_only: false, destructive: true, idempotent: false.
  • Required: query (string): effect ID, exact name, or unique name substring.
  • Optional: controls (object): parameter overrides keyed by control ID; transition (closed object): { "type": "cut" }.

The schema is closed. The transition object accepts exactly one field and one value: { "type": "cut" }. Omitting it also performs a cut. Any extra field or aspirational transition type is rejected instead of ignored.

A display-face effect cannot be applied through set_effect; it returns an invalid-parameter error pointing you at set_display_face.

{
  "name": "set_effect",
  "arguments": {
    "query": "Borealis",
    "controls": { "speed": 0.2 },
    "transition": { "type": "cut" }
  }
}

Response (abridged):

{
  "zone": {
    "id": "...",
    "name": "Primary",
    "layers": [
      {
        "id": "...",
        "source": { "type": "effect", "effect_id": "...", "controls": {} }
      }
    ]
  },
  "transition": { "type": "cut" },
  "output": { "applied": true }
}

The returned zone carries the freshly minted layer ID. Use that zone and layer identity with adjust_controls for later tuning. Reapplying the effect would replace the stack and mint another layer, so it is not a retry-safe adjustment path.

#add_layer

Stack one effect on top of a zone’s layers without replacing anything. Name outputs to limit the layer to part of the zone, such as one keyboard; leave them out and the layer covers the whole zone. Mutates state, non-destructive, and non-idempotent: every call adds another layer with a fresh ID.

  • Required: effect (string): effect ID, exact name, or unique name substring.
  • Optional: zone (string): zone ID, exact name, or unique name substring, defaulting to the primary zone; outputs (string array, at least one entry): the outputs the layer is limited to; blend (enum, default alpha): one of replace, alpha, add, screen, multiply, overlay, soft_light, color_dodge, difference, tint, luma_reveal; opacity (number, default 1.0, range 0-1); controls (object): parameter overrides keyed by control ID.

A display-face effect is accepted only when outputs names screens and nothing else: a face is a layer scoped to the screens it shows on, and one call can put the same face on several. Without outputs, or with an LED output among them, a face would be drawn into the lighting canvas, so the call is refused as set_effect refuses it. A screen’s own display zone is refused as a zone; name the zone that places the screen, or use set_display_face.

Each outputs entry names either one output of the zone or one device. An output resolves by its member ID or name, as the zone’s members list them. A device resolves by the ID or name get_devices reports, or by the device_id its members carry, and stands for every output of that device the zone holds. Entries use the shared selector policy, and a query that matches several candidates is ambiguous only when they select different outputs: a one-output strip and its device are the same target. An output that belongs to another zone does not resolve; move it first or name its zone.

{
  "name": "add_layer",
  "arguments": {
    "effect": "Touch Ripple",
    "outputs": ["Huntsman"],
    "blend": "screen",
    "opacity": 0.8
  }
}

Response (abridged):

{
  "id": "...",
  "name": "Primary",
  "members": [
    { "id": "keyboard-left", "device_id": "razer:huntsman-v3", "segment": "left", "name": "Keyboard left" }
  ],
  "layers": [
    { "id": "...", "source": { "type": "effect", "effect_id": "...", "controls": {} } },
    {
      "id": "...",
      "source": { "type": "effect", "effect_id": "...", "controls": {} },
      "blend": "screen",
      "opacity": 0.8,
      "scope": { "outputs": ["keyboard-left"] }
    }
  ]
}

The response is the updated zone resource, with the new layer on top. Its scope lists the member IDs the selectors resolved to; a whole-zone layer has no scope key. A scoped layer survives set_effect and set_color, which replace only the whole-zone layers beneath it, and goes dark with the rest of the zone on clear_zone. To change the layer’s controls afterwards, use adjust_controls with the returned layer ID.

#list_effects

Browse the effect catalog with optional filters. Read-only, idempotent. Returns effect names, descriptions, categories, tags, and each effect’s control schema.

  • Optional: category (enum): one of ambient, audio, generative, particle, scenic, interactive, fun, source, utility, display; audio_reactive (boolean): filter to audio-reactive effects; query (string): full-text search across names, descriptions, and tags; limit (integer, default 20, range 1-100); offset (integer, default 0).
{ "name": "list_effects", "arguments": { "category": "audio", "limit": 10 } }

The response carries effects, total, has_more, limit, and offset. The catalog is large and growing, so always page rather than hardcoding a count; browse the effects gallery for the visual side.

Effect gallery in the Hypercolor UI

#set_color

Set a solid color globally. Under the hood this replaces the primary zone’s whole-zone layers with the solid_color effect, keeping scoped layers above it as set_effect does; it is not a separate device mode. Mutates state, destructive, and non-idempotent.

The color argument accepts CSS color names (coral, dodgerblue), hex (#ff6ac1), rgb(), hsl(), and natural-language descriptions (warm sunset orange, deep ocean blue), all resolved by the daemon’s fuzzy color resolver.

  • Required: color (string).
  • Optional: brightness (integer, range 0-100): an override on the new solid-color layer.
{ "name": "set_color", "arguments": { "color": "#e135ff", "brightness": 70 } }

The response has the same canonical { zone, transition, output } shape as set_effect. The transition is always { "type": "cut" }, and the returned zone carries the new layer identity for later tuning.

#set_output_power

Pause or resume all output without discarding the active scene, layers, or controls. Mutates state, idempotent, and not destructive. Use it for a reversible blackout. Use clear_zone only when the layer stack itself should be discarded.

  • Required: state (enum): running or paused.
{ "name": "set_output_power", "arguments": { "state": "paused" } }

The response echoes the resulting state. Pausing blacks out the rig while the render pipeline keeps its place, so resuming picks up exactly where it left off.


#Devices

#get_devices

Enumerate known RGB devices with connection status, driver origin, presentation, transport, LED count, and segment count. Read-only and idempotent. An unfiltered call uses the same payload builder as hypercolor://devices, so the two are exact equals.

  • Optional: status (enum, default all): one of all, connected, disconnected; driver_id (string): filter by driver module id; backend_id (string): filter by output backend id.
{ "name": "get_devices", "arguments": { "status": "disconnected" } }

The response carries a devices array plus a summary with total, connected, and total_leds.

Connected devices in the Hypercolor UI

#set_brightness

Set the global brightness level. Brightness is a percentage from 0 to 100 (not a 0.0-1.0 float); the daemon normalizes it internally. Mutates state, idempotent.

  • Required: brightness (integer, range 0-100).
  • Arguments: brightness only. Brightness is global and the change is immediate, so the tool exposes neither a device target nor a fade duration.
{ "name": "set_brightness", "arguments": { "brightness": 35 } }

The response reports the applied brightness, its scope (always global), and the previous global brightness.


#Scenes

Scenes are whole-rig configurations: a scene bundles effects, device assignments, brightness, and transitions into one preset. (Within a scene, zones are flexible canvas partitions; they are not the same thing.)

#activate_scene

Activate a scene by exact ID, exact case-insensitive name, or unique case-insensitive name substring. Mutates state, destructive, and idempotent.

  • Required: name (string).
  • Optional: transition_ms (integer, default 1000, range 0-10000).
{ "name": "activate_scene", "arguments": { "name": "Evening Calm" } }

No match or an ambiguous substring returns the structured selector error described above. A scene that exceeds current media limits returns a structured conflict without changing the active scene.

Scenes in the Hypercolor UI

#list_scenes

List available scenes with names, descriptions, mutation modes, and activation state. Read-only, idempotent. Ephemeral scenes are excluded.

  • Optional: enabled_only (boolean, default false).
{ "name": "list_scenes", "arguments": { "enabled_only": true } }

Each entry includes id, name, description, enabled, mutation_mode, and an active flag.

#create_scene

Create a new scene. The tool is non-idempotent: read_only: false, destructive: false, idempotent: false. It creates a reusable scene with a seeded Primary zone. It does not capture the current runtime state and it does not configure automation.

  • Required: name (string).
  • Optional: description (string); enabled (boolean, default true); mutation_mode (enum, default live): live lets runtime effect and display-face actions rewrite the scene, snapshot freezes it. There is no transition argument: creating a scene renders nothing.
{
  "name": "create_scene",
  "arguments": {
    "name": "Sunset Warmth",
    "description": "Warm lighting for an external sunset automation"
  }
}

The response returns scene_id, name, enabled, and mutation_mode.

#clear_zone

Clear one zone’s layer stack, or every zone’s when zone is omitted. Whole-zone and scoped layers both go; the one exception is a layer scoped only to screens, which is a face and stays. Mutates state, destructive, and idempotent. Clearing the whole scene also quiesces output. A screen’s display zone is refused because display assignments have their own tool.

  • Optional: zone (string): zone ID, exact name, or unique name substring.
{ "name": "clear_zone", "arguments": { "zone": "Primary" } }

The response is the complete canonical scene document after the clear. Omit zone only when the intent is to discard every non-display layer stack and quiesce the rig. For a reversible blackout that preserves every layer, use set_output_power.

#adjust_controls

Atomically patch typed values and remove bindings on one live scene layer. Mutates state, non-destructive, and idempotent. Zones and named layers use the shared deterministic selector. Unnamed layers require their ID.

  • Required: zone (string); layer (string).
  • Optional: values (object, default {}): canonical ControlValue entries keyed by control ID; clear_bindings (string array, default []): bindings removed in the same commit.
{
  "name": "adjust_controls",
  "arguments": {
    "zone": "Primary",
    "layer": "0199...",
    "values": { "speed": { "kind": "float", "value": 0.2 } },
    "clear_bindings": ["speed"]
  }
}

At least one value or binding must be present. Writing a still-bound control returns a conflict; clear that binding in the same call to take ownership atomically. A layer replaced after it was read returns not found instead of applying values to a different effect. The response contains the updated zone and its scene revision.


#System

#get_status

Get the current daemon state: active effect, global brightness, connected device count, effect and scene counts, FPS metrics, input health, and uptime. Read-only, idempotent. Takes no arguments. The same payload builder serves hypercolor://state, so an empty call and the resource are exact equals.

This is the tool to call first. The reported fps.target is the current adaptive tier (the render loop shifts between 10/20/30/45/60 Hz). fps.capacity is a capacity estimate: the theoretical throughput derived from smoothed frame time, capped at the tier. fps.actual mirrors fps.capacity, so it is not measured delivery; the real delivery rate is the separate fps.delivered field. Never read any of them as a fixed ceiling.

{ "name": "get_status", "arguments": {} }

Response (abridged):

{
  "running": true,
  "paused": false,
  "brightness": 70,
  "fps": { "target": 60, "capacity": 59.4, "delivered": 58.7, "actual": 59.4 },
  "effect": { "id": "...", "name": "Borealis" },
  "effect_count": 59,
  "scene_count": 4,
  "devices": { "connected": 3, "total": 4, "total_leds": 412 },
  "inputs": {
    "audio": "enabled",
    "screen": "disabled",
    "input": "enabled",
    "input_devices_opened": 2,
    "input_devices_denied": 0,
    "input_degraded": null,
    "source_graph_generation": 7,
    "sources": []
  },
  "uptime_seconds": 8123,
  "version": "..."
}

#get_audio_state

Get the current audio analysis: overall level, bass/mid/treble energy, beat detection, beat confidence, and a BPM estimate. Read-only, idempotent. Takes no arguments.

{ "name": "get_audio_state", "arguments": {} }

The response carries enabled, a levels object (overall, bass, mid, treble), a beat object (detected, confidence, bpm_estimate), and spectrum_bins. For a streaming view of the same data, read the hypercolor://audio resource, which updates at roughly 10 Hz.

#get_layout

Get the current spatial layout: device positions, zones, and topology. Read-only, idempotent. Takes no arguments.

{ "name": "get_layout", "arguments": {} }

The response carries a layout object (id, name, description, canvas_width, canvas_height, zone_count), a zones array, and total_devices plus total_leds. The canvas defaults to 640×480 but is configurable, so read the reported dimensions rather than assuming them.

#get_sensor_data

Get the latest system telemetry snapshot, or one named sensor reading: CPU, GPU, memory, and raw component temperatures. Read-only, idempotent.

  • Optional: label (string): a sensor label such as cpu_temp, gpu_load, ram_used, or a normalized raw component label. Omit for the full snapshot.
{ "name": "get_sensor_data", "arguments": { "label": "gpu_load" } }

The response returns a snapshot object and a reading field (populated only when a matching label was requested).

#diagnose

Run the canonical safe system diagnostic pass. Read-only and idempotent. The tool calls the same collector as REST instead of maintaining a second diagnostic engine.

  • Arguments: none. The input schema is an empty closed object. checks, device_id, system, and every other undeclared field are rejected.
{ "name": "diagnose", "arguments": {} }

The response is the canonical REST data object: checks[] entries carry category, name, status, and detail; summary counts passed, warning, and failed checks; snapshot carries input, render, usb, display_output, and device_output. MCP always runs the safe default checks: daemon, render, devices, conflicts, config, input, memory, and openrgb. It does not expose the protected macos_screen_parity check. This is the backbone of the diagnose flow in agent workflows.


#OpenRGB setup status (openrgb_status)

Inspect OpenRGB on the daemon host before recommending fallback hardware support. Read-only and idempotent; takes no arguments.

{ "name": "openrgb_status", "arguments": {} }

The response includes the compiled and enabled bridge state, ownership settings, host platform, installation path and version, SDK endpoint probes, permission checks and remedies, install hints, coverage rows, and output-disabled count. Endpoint probes run even when bridge output is disabled. The CLI command hypercolor openrgb status and GET /api/v1/system/openrgb use the same typed payload. The openrgb_setup prompt guides the next steps.

#Displays

#set_display_face

Assign or clear an HTML display-face effect on a display device (an LCD or similar). Mutates state, destructive, and non-idempotent.

The target effect must be in the Display category and be an HTML source; anything else returns an invalid-parameter error. set_effect will refuse a display effect; add_layer takes one when its outputs are screens.

  • Required: device (string): display device ID, exact name, or unique name substring.
  • Optional: effect_id (string): display-face effect ID, exact name, or unique name substring; omit when clearing. clear (boolean): when true, removes the assignment on the chosen scope. scope (enum): scene makes the face the screen’s one layer in the active scene, in the zone that places the screen; default (the default, deprecated in favor of screen layers and kept through 1.x) stores a kept face that shows in every scene that leaves the screen alone. controls (object): control overrides stored with the face.

The result names the effect, the screen’s zone, live_scope (where the assignment lives), and rendering: scene, default, or none, for what is on the panel now.

{
  "name": "set_display_face",
  "arguments": {
    "device": "AX Display",
    "effect_id": "clock-face",
    "scope": "default"
  }
}

To clear a face, pass "clear": true and the same scope. See display faces for authoring the HTML side.


#Effect authoring

These three tools let an agent write an HTML effect against a running daemon without leaving MCP: install the page, read what it printed, and look at what it drew. The live authoring workflow strings them into a loop.

#install_effect

Install or update an HTML effect from its complete page source. Mutates state, destructive, and non-idempotent, since every call restarts the running page and returns a new console cursor. The page lands in the user effects directory and joins the catalog immediately, so no rescan is needed.

  • Required: html (string, at most 1 MiB): the complete HTML document.
  • Optional: file_name (string, 1-128 characters): the installed file name, such as ember.html. Defaults to a slug of the page <title>.

The page needs a <title>, a render surface (<canvas id="exCanvas">, or <div id="faceContainer"> for a display face), and a <script>. Controls are declared with <meta property=...> tags, and validation checks those declarations and any bundled presets too. Nothing is written until the page passes, and every failure comes back at once in one invalid-parameter error (-32602):

{
  "code": -32602,
  "message": "invalid parameter 'html': effect failed validation: Missing <title> tag; Missing required render surface; Missing <script> tag",
  "details": { "parameter": "html" }
}

Reusing a file_name replaces that effect in place and keeps its ID, so a layer already running the effect reloads the new page on its own. That reload is why the tool is not idempotent: repeating an identical call restarts the running page and returns a new console cursor, so do not retry it blindly. A first install only adds the effect to the catalog, so call set_effect once to put it on a layer. The tool is destructive because a reused file name overwrites the page that was installed under it.

{
  "name": "install_effect",
  "arguments": {
    "html": "<!DOCTYPE html><html><head><title>Livecode Probe</title>...</html>",
    "file_name": "probe.html"
  }
}

Response:

{
  "id": "e77d0339-0967-495f-bf5c-b57fcfbc5faf",
  "name": "Livecode Probe",
  "path": "/home/you/.local/share/hypercolor/effects/user/probe.html",
  "controls": 2,
  "presets": 0,
  "replaced_existing": false,
  "console_after": 6
}

The controls and presets fields count what the page declares. The console_after field is the effect console cursor taken just before the install; pass it to get_effect_console as after to read only what the new page printed.

#get_effect_console

Read what HTML effect pages printed: console.log output, warnings, and uncaught script errors, oldest first. Read-only, idempotent.

  • Optional: after (integer, default 0, minimum 0): return only messages recorded after this cursor, where 0 reads everything retained; limit (integer, default 100, range 1-500); effect (string): effect ID or name to narrow to; level (enum, default debug): one of debug, log, warn, error.

The level argument is a severity floor, not an exact match: warn returns warnings and errors, and error returns errors only, including uncaught exceptions. The log floor covers console.log, info, and dir output, while debug adds debug and trace output on top.

{ "name": "get_effect_console", "arguments": { "after": 6, "level": "warn" } }

Response:

{
  "entries": [
    {
      "seq": 7,
      "timestamp_ms": 1791817200123,
      "level": "error",
      "message": "Error at file:///home/you/.local/share/hypercolor/effects/user/probe.html:19:5 undefinedFunctionCall is not defined",
      "effect_name": "Livecode Probe",
      "effect_id": "e77d0339-0967-495f-bf5c-b57fcfbc5faf",
      "source_file": "probe.html",
      "line": 19
    }
  ],
  "next_seq": 7,
  "truncated": false
}

The engine loads each effect from a runtime copy with an injected preamble, so raw script locations would point at the wrong file and line. Locations in an effect’s own page are mapped back to the author’s file, both in the message text and in source_file and line. The effect_id and line fields are omitted when the message has no catalog effect or no location. The timestamp_ms field is milliseconds since the Unix epoch.

Pass next_seq back as after to read only newer output. The journal keeps the latest 512 messages process-wide, so a reader that falls behind loses the oldest ones; truncated: true reports that output after your cursor was evicted. Web viewport pages are not effects and stay out of the journal.

#capture_canvas

Look at what the engine is rendering right now. Read-only, not destructive, and not idempotent: every call samples whatever is on the canvas at that moment, so two identical calls return different images.

  • Optional: frames (integer, default 1, range 1-8); interval_ms (integer, default 250, range 0-2000): pause between frames in a burst; width (integer, default 320, range 16-4096): output width in pixels; format (enum, default jpeg): jpeg or png.

The height follows the canvas aspect ratio, and the capture never upscales: a width at or past the canvas width returns the canvas at its own size. JPEG keeps a burst small; PNG keeps exact pixel values for color checks. Use frames above 1 with interval_ms to judge motion and speed.

The canvas is the composed image effects draw at full brightness, before the spatial sampler maps it onto LEDs. The physical LEDs show a sampled, brightness-scaled version of it, so a capture shows what the effect draws rather than what any one LED emits.

{ "name": "capture_canvas", "arguments": { "width": 64 } }

Response (structured content):

{
  "frames": [
    {
      "frame_number": 258,
      "timestamp_ms": 9036,
      "width": 64,
      "height": 48,
      "fresh": true,
      "mime_type": "image/jpeg"
    }
  ],
  "source_width": 640,
  "source_height": 480
}

The images themselves arrive as MCP image content blocks, one per frame, in the same order as frames. A frame’s timestamp_ms counts milliseconds since the daemon started, unlike the console’s epoch timestamps. Each frame waits up to 1.5 seconds for a newly rendered canvas. A frame with fresh: false is the last one published before rendering went quiet, which usually means nothing is drawing, and a burst stops at the first stale frame, so it can return fewer frames than requested. When no canvas has been rendered at all, the call returns a state conflict (-32000) asking you to apply an effect first.


#A note on rescanning effects

There is no MCP tool to rescan the effects directory, and the MCP authoring loop does not need one: install_effect registers the page as it writes it. Files that reach the effects directory some other way need hypercolor effects rescan before set_effect can find them. That cross-transport pattern is covered in CLI scripting for agents.

#Where to go next