Skip to main content
Glama

set_effect

Apply a specific lighting effect to Nanoleaf smart lights using the MCP server. Input the effect name to instantly enhance or change the ambient lighting setup.

Instructions

Set an effect on the Nanoleaf lights

Input Schema

NameRequiredDescriptionDefault
effectYesName of the effect to apply

Input Schema (JSON Schema)

{ "properties": { "effect": { "description": "Name of the effect to apply", "type": "string" } }, "required": [ "effect" ], "type": "object" }

Implementation Reference

  • MCP tool handler for 'set_effect': extracts effect name from arguments, calls primaryDevice.setEffect(effect), and returns success message.
    case 'set_effect': const effect = request.params.arguments?.effect as string; await primaryDevice.setEffect(effect); return { content: [ { type: 'text', text: `Effect set to: ${effect}`, }, ], };
  • Input schema for 'set_effect' tool defining required 'effect' string parameter.
    inputSchema: { type: 'object', properties: { effect: { type: 'string', description: 'Name of the effect to apply', }, }, required: ['effect'],
  • src/index.ts:119-132 (registration)
    Registration of 'set_effect' tool in ListToolsRequestHandler response, including name, description, and input schema.
    { name: 'set_effect', description: 'Set an effect on the Nanoleaf lights', inputSchema: { type: 'object', properties: { effect: { type: 'string', description: 'Name of the effect to apply', }, }, required: ['effect'], }, },
  • Core implementation of setEffect in NanoleafClient class: sends PUT request to /effects endpoint with {select: effectName}.
    async setEffect(effectName: string): Promise<void> { await this.httpClient.put(this.getAuthUrl('/effects'), { select: effectName }); }

Other Tools

Related Tools

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/srnetadmin/nanoleaf-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server