turn_on_nanoleaf
Activate Nanoleaf smart lights using the Nanoleaf MCP Server. This tool enables control of connected lights via MCP-compatible clients, providing a simple command to turn them on.
Instructions
Turn on the Nanoleaf lights
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"properties": {},
"type": "object"
}
Implementation Reference
- src/index.ts:311-320 (handler)The MCP tool handler for 'turn_on_nanoleaf' which calls the NanoleafClient's turnOn method and returns a success message.case 'turn_on_nanoleaf': await primaryDevice.turnOn(); return { content: [ { type: 'text', text: 'Nanoleaf lights turned on', }, ], };
- src/index.ts:65-72 (registration)Registration of the 'turn_on_nanoleaf' tool in the ListTools response, including name, description, and empty input schema.{ name: 'turn_on_nanoleaf', description: 'Turn on the Nanoleaf lights', inputSchema: { type: 'object', properties: {}, }, },
- src/nanoleaf-client.ts:156-160 (helper)Core implementation of turning on the Nanoleaf lights by sending an authenticated PUT request to the /state endpoint setting 'on' to true.async turnOn(): Promise<void> { await this.httpClient.put(this.getAuthUrl('/state'), { on: { value: true } }); }