Skip to main content
Glama
kaeljune

Fibaro HC3 MCP Server

by kaeljune

fibaro_turn_on_device

Activate smart home devices such as lights or switches in your Fibaro Home Center 3 system by specifying the device ID.

Instructions

Turn on a device (like lights, switches)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesDevice ID to turn on

Implementation Reference

  • MCP tool handler for 'fibaro_turn_on_device': validates connection, extracts device ID from arguments, calls FibaroClient.turnOnDevice, and returns success message.
    case 'fibaro_turn_on_device': {
      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;
      await this.fibaroClient.turnOnDevice(deviceId);
      return {
        content: [
          {
            type: 'text',
            text: `Successfully turned on device ${deviceId}`,
          },
        ],
      };
    }
  • Tool schema definition including name, description, and input schema requiring a numeric 'id'.
    {
      name: 'fibaro_turn_on_device',
      description: 'Turn on a device (like lights, switches)',
      inputSchema: {
        type: 'object',
        properties: {
          id: {
            type: 'number',
            description: 'Device ID to turn on',
          },
        },
        required: ['id'],
      },
    },
  • src/index.ts:109-331 (registration)
    Registration of all tools including 'fibaro_turn_on_device' in the ListToolsRequestSchema handler.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: [
          {
            name: 'fibaro_get_devices',
            description: 'Get all devices from Fibaro HC3',
            inputSchema: {
              type: 'object',
              properties: {},
            },
          },
          {
            name: 'fibaro_get_device',
            description: 'Get specific device by ID from Fibaro HC3',
            inputSchema: {
              type: 'object',
              properties: {
                id: {
                  type: 'number',
                  description: 'Device ID',
                },
              },
              required: ['id'],
            },
          },
          {
            name: 'fibaro_get_scenes',
            description: 'Get all scenes from Fibaro HC3',
            inputSchema: {
              type: 'object',
              properties: {},
            },
          },
          {
            name: 'fibaro_get_scene',
            description: 'Get specific scene by ID from Fibaro HC3',
            inputSchema: {
              type: 'object',
              properties: {
                id: {
                  type: 'number',
                  description: 'Scene ID',
                },
              },
              required: ['id'],
            },
          },
          {
            name: 'fibaro_get_rooms',
            description: 'Get all rooms from Fibaro HC3',
            inputSchema: {
              type: 'object',
              properties: {},
            },
          },
          {
            name: 'fibaro_turn_on_device',
            description: 'Turn on a device (like lights, switches)',
            inputSchema: {
              type: 'object',
              properties: {
                id: {
                  type: 'number',
                  description: 'Device ID to turn on',
                },
              },
              required: ['id'],
            },
          },
          {
            name: 'fibaro_turn_off_device',
            description: 'Turn off a device (like lights, switches)',
            inputSchema: {
              type: 'object',
              properties: {
                id: {
                  type: 'number',
                  description: 'Device ID to turn off',
                },
              },
              required: ['id'],
            },
          },
          {
            name: 'fibaro_set_device_value',
            description: 'Set a specific property value for a device. Use this ONLY for advanced properties like temperature setpoints, modes, or custom device properties. Do NOT use for brightness (use fibaro_set_brightness) or colors (use fibaro_set_color).',
            inputSchema: {
              type: 'object',
              properties: {
                id: {
                  type: 'number',
                  description: 'Device ID',
                },
                property: {
                  type: 'string',
                  description: 'Property name to set (e.g., "targetTemperature", "mode", "state")',
                },
                value: {
                  type: ['string', 'number', 'boolean'],
                  description: 'Value to set',
                },
              },
              required: ['id', 'property', 'value'],
            },
          },
          {
            name: 'fibaro_set_brightness',
            description: 'Set brightness or dimmer level for lights and dimmable devices. Use this when user mentions brightness, dimming, intensity, or percentage levels (0-100%). Keywords: bright, dim, brightness, level, percent, %.',
            inputSchema: {
              type: 'object',
              properties: {
                id: {
                  type: 'number',
                  description: 'Device ID',
                },
                brightness: {
                  type: 'number',
                  description: 'Brightness level (0-100)',
                  minimum: 0,
                  maximum: 100,
                },
              },
              required: ['id', 'brightness'],
            },
          },
          {
            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'],
            },
          },
          {
            name: 'fibaro_control_rgb_light',
            description: 'Complete control for RGB lights: turn on/off, set color, and brightness in one command. Use this when user wants to control multiple aspects of an RGB light at once (e.g., "turn on light 5 red color at 50% brightness").',
            inputSchema: {
              type: 'object',
              properties: {
                id: {
                  type: 'number',
                  description: 'Device ID',
                },
                action: {
                  type: 'string',
                  enum: ['on', 'off'],
                  description: 'Turn light on or off',
                },
                color_name: {
                  type: 'string',
                  description: 'Color name (e.g., "red", "green", "blue", "xanh lá", "tím")',
                },
                brightness: {
                  type: 'number',
                  description: 'Brightness level (0-100), optional',
                  minimum: 0,
                  maximum: 100,
                },
              },
              required: ['id', 'action'],
            },
          },
          {
            name: 'fibaro_run_scene',
            description: 'Run/start a scene',
            inputSchema: {
              type: 'object',
              properties: {
                id: {
                  type: 'number',
                  description: 'Scene ID to run',
                },
              },
              required: ['id'],
            },
          },
          {
            name: 'fibaro_stop_scene',
            description: 'Stop a running scene',
            inputSchema: {
              type: 'object',
              properties: {
                id: {
                  type: 'number',
                  description: 'Scene ID to stop',
                },
              },
              required: ['id'],
            },
          },
        ],
      };
    });
  • FibaroClient helper method that sends HTTP POST to Fibaro API to turn on the specified device.
    async turnOnDevice(id: number): Promise<void> {
      try {
        await this.client.post(`/api/devices/${id}/action/turnOn`, {
          args: []
        });
      } catch (error) {
        throw new Error(`Failed to turn on device ${id}: ${error}`);
      }
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states the action ('Turn on') but lacks critical behavioral details: whether this requires authentication, if it's idempotent, what happens on failure, or any rate limits. For a mutation tool with zero annotation coverage, this is a significant gap in safety and operational context.

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 a single, efficient sentence with zero waste. It's front-loaded with the core action and includes helpful examples without unnecessary elaboration, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given this is a mutation tool with no annotations and no output schema, the description is incomplete. It lacks information on permissions, error handling, return values, or how it differs from sibling tools. The context signals indicate minimal complexity, but the description doesn't compensate for the missing structured data.

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 the single parameter 'id' documented as 'Device ID to turn on'. The description adds no additional parameter semantics beyond this, such as format examples or where to find device IDs. Baseline 3 is appropriate since the schema adequately covers the parameter.

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 action ('Turn on') and target resource ('a device'), with examples ('like lights, switches') that help clarify scope. It distinguishes from obvious opposites like 'fibaro_turn_off_device', but doesn't explicitly differentiate from similar siblings like 'fibaro_set_device_value' or 'fibaro_set_brightness' for brightness control.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites (e.g., device must be off), exclusions (e.g., not for RGB lights), or comparisons to siblings like 'fibaro_set_brightness' for dimmable devices or 'fibaro_set_device_value' for generic control.

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