Skip to main content
Glama
kaeljune

Fibaro HC3 MCP Server

by kaeljune

fibaro_set_color

Change the color of RGB lights and color-changing devices by specifying red, green, and blue values to customize lighting in your smart home.

Instructions

Set RGB color for RGB lights and color-changing devices. Use this when user mentions colors, color names, or wants to change light color. Keywords: color, red, green, blue, yellow, purple, pink, orange, cyan, magenta, white, RGB, màu.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesDevice ID
redYesRed color value (0-255)
greenYesGreen color value (0-255)
blueYesBlue color value (0-255)
whiteNoWhite color value (0-255), optional

Implementation Reference

  • MCP tool handler for 'fibaro_set_color' that validates connection, extracts RGB parameters, calls FibaroClient.setColor, and returns success message.
    case 'fibaro_set_color': {
      if (!this.fibaroClient) {
        throw new Error('Not connected to Fibaro HC3. Please check your configuration and restart the MCP server.');
      }
      const deviceId = args?.id as number;
      const red = args?.red as number;
      const green = args?.green as number;
      const blue = args?.blue as number;
      const white = args?.white as number || 0;
      await this.fibaroClient.setColor(deviceId, red, green, blue, white);
      return {
        content: [
          {
            type: 'text',
            text: `Successfully set color for device ${deviceId} to RGB(${red},${green},${blue},${white})`,
          },
        ],
      };
    }
  • src/index.ts:234-271 (registration)
    Registration of the 'fibaro_set_color' tool in the ListTools response, including name, description, and input schema definition.
    {
      name: 'fibaro_set_color',
      description: 'Set RGB color for RGB lights and color-changing devices. Use this when user mentions colors, color names, or wants to change light color. Keywords: color, red, green, blue, yellow, purple, pink, orange, cyan, magenta, white, RGB, màu.',
      inputSchema: {
        type: 'object',
        properties: {
          id: {
            type: 'number',
            description: 'Device ID',
          },
          red: {
            type: 'number',
            description: 'Red color value (0-255)',
            minimum: 0,
            maximum: 255,
          },
          green: {
            type: 'number',
            description: 'Green color value (0-255)',
            minimum: 0,
            maximum: 255,
          },
          blue: {
            type: 'number',
            description: 'Blue color value (0-255)',
            minimum: 0,
            maximum: 255,
          },
          white: {
            type: 'number',
            description: 'White color value (0-255), optional',
            minimum: 0,
            maximum: 255,
          },
        },
        required: ['id', 'red', 'green', 'blue'],
      },
    },
  • FibaroClient helper method that performs the actual API call to set RGB color on a Fibaro device.
    async setColor(id: number, red: number, green: number, blue: number, white: number = 0): Promise<void> {
      try {
        await this.client.post(`/api/devices/${id}/action/setColor`, {
          args: [red, green, blue, white]
        });
      } catch (error) {
        throw new Error(`Failed to set color for device ${id} to RGB(${red},${green},${blue},${white}): ${error}`);
      }
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While it states the tool sets colors, it doesn't mention any behavioral traits: whether this requires specific permissions, if it's a destructive/write operation (implied but not stated), rate limits, error conditions, or what happens to devices not supporting RGB. For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

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 description is appropriately sized and front-loaded: the first sentence states the core purpose, followed by usage guidance and keywords. The keyword list is somewhat redundant with the usage context but serves as a quick reference. Overall, it's efficient with minimal waste, though the keyword list could be integrated more seamlessly.

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?

Given the tool's complexity (a write operation with 5 parameters) and the absence of annotations and output schema, the description is moderately complete. It covers purpose and usage but lacks behavioral details (e.g., side effects, permissions) and output information. For a mutation tool without annotations, it should do more to compensate, but the clear purpose and usage guidelines provide a basic foundation.

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 100%, with all parameters well-documented in the schema (e.g., 'Red color value (0-255)'). The description doesn't add any parameter-specific information beyond what's in the schema. According to the rules, when schema coverage is high (>80%), the baseline is 3 even with no param info in the description, which applies here.

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 clearly states the tool's purpose: 'Set RGB color for RGB lights and color-changing devices.' This specifies the verb ('Set') and resource ('RGB color for RGB lights and color-changing devices'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'fibaro_control_rgb_light' or 'fibaro_set_brightness', which likely have overlapping functionality.

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?

The description provides clear usage context: 'Use this when user mentions colors, color names, or wants to change light color.' This gives practical guidance on when to invoke the tool. It also includes a keyword list for pattern matching. However, it doesn't specify when NOT to use this tool or mention alternatives among the siblings (e.g., when to use 'fibaro_set_brightness' instead).

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kaeljune/fibaro-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server