turn_off_nanoleaf
Turn off Nanoleaf smart lights using the Model Context Protocol server. Control lighting directly from your terminal or MCP-compatible client.
Instructions
Turn off the Nanoleaf lights
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:73-80 (registration)Registration of the 'turn_off_nanoleaf' tool including its name, description, and empty input schema in the listTools response.{ name: 'turn_off_nanoleaf', description: 'Turn off the Nanoleaf lights', inputSchema: { type: 'object', properties: {}, }, },
- src/index.ts:322-331 (handler)Handler logic for the 'turn_off_nanoleaf' tool call within the CallToolRequestSchema switch statement. Delegates to NanoleafClient.turnOff() method.case 'turn_off_nanoleaf': await primaryDevice.turnOff(); return { content: [ { type: 'text', text: 'Nanoleaf lights turned off', }, ], };
- src/nanoleaf-client.ts:162-166 (helper)Core implementation of turning off the Nanoleaf lights by sending a PUT request to /state endpoint with { on: { value: false } }.async turnOff(): Promise<void> { await this.httpClient.put(this.getAuthUrl('/state'), { on: { value: false } }); }