Skip to main content
Glama

fibaro_get_device

Retrieve detailed information about a specific smart device by its ID from Fibaro Home Center 3. Enables precise device monitoring and control within the Fibaro HC3 MCP Server ecosystem.

Instructions

Get specific device by ID from Fibaro HC3

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesDevice ID

Implementation Reference

  • src/index.ts:120-133 (registration)
    Registration of the 'fibaro_get_device' tool in the ListTools response, including its description and input schema.
    { 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'], }, },
  • The main handler for the 'fibaro_get_device' tool in the CallToolRequest switch statement. It calls FibaroClient.getDevice and formats the response.
    case 'fibaro_get_device': { if (!this.fibaroClient) { throw new Error('Not connected to Fibaro HC3. Please check your configuration and restart the MCP server.'); } const device = await this.fibaroClient.getDevice(args?.id as number); return { content: [ { type: 'text', text: `Device ${device.id}:\nName: ${device.name}\nType: ${device.type}\nRoom ID: ${device.roomID}\nEnabled: ${device.enabled}\nVisible: ${device.visible}\nProperties: ${JSON.stringify(device.properties, null, 2)}`, }, ], }; }
  • The helper method in FibaroClient that performs the actual API call to retrieve a specific device by ID from the Fibaro HC3.
    async getDevice(id: number): Promise<Device> { try { const response = await this.client.get(`/api/devices/${id}`); return response.data; } catch (error) { throw new Error(`Failed to get device ${id}: ${error}`); } }
  • Input schema definition for the 'fibaro_get_device' tool, specifying the required 'id' parameter.
    inputSchema: { type: 'object', properties: { id: { type: 'number', description: 'Device ID', }, }, required: ['id'], },

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