Skip to main content
Glama

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
NameRequiredDescriptionDefault

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: {},
      },
    },
  • 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',
          },
        ],
      };
  • 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 }
      });
    }

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