Skip to main content
Glama

fibaro_get_devices

Retrieve all connected smart devices from Fibaro Home Center 3 to manage and control them efficiently through the HC3 MCP Server.

Instructions

Get all devices from Fibaro HC3

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler for the fibaro_get_devices tool. Checks connection, fetches all devices via FibaroClient.getDevices(), and returns a formatted text list of devices.
    case 'fibaro_get_devices': { if (!this.fibaroClient) { throw new Error('Not connected to Fibaro HC3. Please check your configuration and restart the MCP server.'); } const devices = await this.fibaroClient.getDevices(); return { content: [ { type: 'text', text: `Found ${devices.length} devices:\n\n${devices .map(d => `ID: ${d.id} - ${d.name} (${d.type}) - Room: ${d.roomID}`) .join('\n')}`, }, ], }; }
  • src/index.ts:112-119 (registration)
    Registration of the fibaro_get_devices tool in the listTools response, including name, description, and input schema.
    { name: 'fibaro_get_devices', description: 'Get all devices from Fibaro HC3', inputSchema: { type: 'object', properties: {}, }, },
  • Type definition (schema) for Device objects returned by the tool.
    export interface Device { id: number; name: string; type: string; roomID: number; enabled: boolean; visible: boolean; properties: Record<string, any>; }
  • Core helper method in FibaroClient that implements the API call to fetch devices from Fibaro HC3 (/api/devices). Called by the tool handler.
    async getDevices(): Promise<Device[]> { try { const response = await this.client.get('/api/devices'); return response.data; } catch (error) { throw new Error(`Failed to get devices: ${error}`); } }

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