Skip to main content
Glama

set_brightness

Adjust the brightness level of Nanoleaf smart lights from 0 to 100 percent using the MCP server for precise lighting control.

Instructions

Set the brightness of the Nanoleaf lights

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
brightnessYesBrightness level (0-100)

Implementation Reference

  • src/index.ts:81-96 (registration)
    Registration of the 'set_brightness' tool, including its description and input schema defining brightness as a number between 0-100.
    {
      name: 'set_brightness',
      description: 'Set the brightness of the Nanoleaf lights',
      inputSchema: {
        type: 'object',
        properties: {
          brightness: {
            type: 'number',
            description: 'Brightness level (0-100)',
            minimum: 0,
            maximum: 100,
          },
        },
        required: ['brightness'],
      },
    },
  • MCP tool handler for 'set_brightness': extracts brightness argument, calls NanoleafClient.setBrightness, and returns confirmation.
    case 'set_brightness':
      const brightness = request.params.arguments?.brightness as number;
      await primaryDevice.setBrightness(brightness);
      return {
        content: [
          {
            type: 'text',
            text: `Brightness set to ${brightness}%`,
          },
        ],
      };
  • Core implementation of setBrightness in NanoleafClient: validates input range and sends HTTP PUT request to update device state.
    async setBrightness(brightness: number): Promise<void> {
      if (brightness < 0 || brightness > 100) {
        throw new Error('Brightness must be between 0 and 100');
      }
      await this.httpClient.put(this.getAuthUrl('/state'), {
        brightness: { value: brightness }
      });
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden for behavioral disclosure. It states the tool sets brightness but doesn't mention whether this requires prior authentication/connection, what happens if lights are off, or any side effects. For a mutation tool with zero annotation coverage, this leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without any wasted words. It's appropriately sized and front-loaded, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given this is a mutation tool with no annotations, no output schema, and multiple sibling tools, the description is incomplete. It doesn't address prerequisites (like needing authorization), behavioral implications, or how it differs from similar tools like 'set_color'. For a tool that modifies device state, more context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description mentions 'brightness' but doesn't add meaningful semantics beyond what the schema already provides (brightness level 0-100). With 100% schema description coverage and only one parameter, the baseline is 3 since the schema does the heavy lifting, and the description doesn't compensate with additional context.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Set') and target resource ('brightness of the Nanoleaf lights'), making the purpose immediately understandable. It doesn't explicitly distinguish from siblings like 'set_color' or 'set_effect', but the specificity of 'brightness' provides implicit differentiation. This is clear but lacks explicit sibling comparison.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'set_color' or 'set_effect', nor does it mention prerequisites such as needing authorization or connection first. It simply states what the tool does without contextual usage information.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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