get_nanoleaf_info
Retrieve detailed information about Nanoleaf smart lights, including device status and settings, using the Nanoleaf MCP Server for efficient control and management.
Instructions
Get information about the Nanoleaf device
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"properties": {},
"type": "object"
}
Implementation Reference
- src/index.ts:301-309 (handler)MCP tool handler case for 'get_nanoleaf_info' that retrieves Nanoleaf device information using primaryDevice.getInfo() and returns it as a JSON-formatted text response.case 'get_nanoleaf_info': return { content: [ { type: 'text', text: JSON.stringify(await primaryDevice.getInfo(), null, 2), }, ], };
- src/nanoleaf-client.ts:151-154 (helper)Core implementation of getInfo method in NanoleafClient class, which performs an authenticated GET request to the Nanoleaf API root endpoint and returns the device information.async getInfo(): Promise<NanoleafInfo> { const response = await this.httpClient.get(this.getAuthUrl('')); return response.data; }
- src/index.ts:57-64 (registration)Tool registration in ListTools handler, defining name, description, and empty input schema for 'get_nanoleaf_info'.{ name: 'get_nanoleaf_info', description: 'Get information about the Nanoleaf device', inputSchema: { type: 'object', properties: {}, }, },
- src/nanoleaf-client.ts:13-50 (schema)TypeScript interface NanoleafInfo defining the structure of the device information returned by getInfo(), serving as output schema.export interface NanoleafInfo { name: string; serialNo: string; manufacturer: string; firmwareVersion: string; model: string; state: { on: { value: boolean; }; brightness: { value: number; max: number; min: number; }; hue: { value: number; max: number; min: number; }; sat: { value: number; max: number; min: number; }; ct: { value: number; max: number; min: number; }; colorMode: string; }; effects: { select: string; effectsList: string[]; }; panelLayout: any; }