turn_on_nanoleaf
Activate Nanoleaf smart lights to illuminate your space using the Nanoleaf MCP Server, enabling control from compatible clients like Warp terminal.
Instructions
Turn on the Nanoleaf lights
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "turn_on_nanoleaf"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:311-320 (handler)MCP tool handler for 'turn_on_nanoleaf' that calls primaryDevice.turnOn() 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 including its name, description, and input schema (empty object).
{ name: 'turn_on_nanoleaf', description: 'Turn on the Nanoleaf lights', inputSchema: { type: 'object', properties: {}, }, }, - src/nanoleaf-client.ts:156-160 (helper)Core implementation of the turnOn method in NanoleafClient class, which sends a PUT request to the /state endpoint to turn the lights on.
async turnOn(): Promise<void> { await this.httpClient.put(this.getAuthUrl('/state'), { on: { value: true } }); }