Skip to main content
Glama
kaeljune

Fibaro HC3 MCP Server

by kaeljune

fibaro_turn_off_device

Turn off a Fibaro HC3 smart home device by specifying its ID. Use this tool to control lights, switches, and other connected devices through the MCP server.

Instructions

Turn off a device (like lights, switches)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesDevice ID to turn off

Implementation Reference

  • Core handler logic: sends POST request to Fibaro HC3 API /api/devices/{id}/action/turnOff to turn off the device.
    async turnOffDevice(id: number): Promise<void> {
      try {
        await this.client.post(`/api/devices/${id}/action/turnOff`, {
          args: []
        });
      } catch (error) {
        throw new Error(`Failed to turn off device ${id}: ${error}`);
      }
    }
  • MCP CallTool handler for 'fibaro_turn_off_device': validates connection, extracts device ID, calls FibaroClient.turnOffDevice, returns success response.
    case 'fibaro_turn_off_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.turnOffDevice(deviceId);
      return {
        content: [
          {
            type: 'text',
            text: `Successfully turned off device ${deviceId}`,
          },
        ],
      };
    }
  • Tool schema definition including name, description, and input schema requiring 'id' as number.
    {
      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'],
      },
    },
Behavior2/5

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

With no annotations, the description carries full burden but only states the basic action. It doesn't disclose behavioral traits such as required permissions, whether the change is immediate/reversible, error conditions (e.g., invalid ID), or side effects (e.g., device state updates).

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.

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?

For a mutation tool with no annotations and no output schema, the description is incomplete. It lacks information on return values, error handling, and behavioral context needed for reliable agent use, given the tool's potential impact.

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%, so the schema already documents the 'id' parameter fully. The description adds no additional meaning about the parameter (e.g., how to find device IDs, format constraints), resulting in the baseline score for high schema coverage.

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 off') and target resource ('a device'), with examples ('like lights, switches') that help clarify scope. However, it doesn't explicitly differentiate from sibling tools like 'fibaro_turn_on_device' or 'fibaro_set_device_value' beyond the obvious opposite action.

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. It doesn't mention prerequisites (e.g., device must be on), exclusions (e.g., not for scenes), or comparisons to siblings like 'fibaro_set_device_value' for more granular 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