Skip to main content
Glama

set_effect

Apply visual effects to Nanoleaf smart lights by specifying effect names, enabling dynamic lighting control through the MCP server.

Instructions

Set an effect on the Nanoleaf lights

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
effectYesName of the effect to apply

Implementation Reference

  • Executes the 'set_effect' tool call by extracting the effect argument and delegating to the NanoleafClient's setEffect method, then returns a 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}`,
          },
        ],
      };
  • src/index.ts:119-132 (registration)
    Registers the 'set_effect' tool in the list of available tools, including its name, description, and input schema requiring an 'effect' string.
    {
      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 setting an effect by sending a PUT request to the Nanoleaf API's /effects endpoint with the selected effect name.
    async setEffect(effectName: string): Promise<void> {
      await this.httpClient.put(this.getAuthUrl('/effects'), {
        select: effectName
      });
    }
  • Defines the input schema for the 'set_effect' tool, specifying a required 'effect' parameter of type string.
    inputSchema: {
      type: 'object',
      properties: {
        effect: {
          type: 'string',
          description: 'Name of the effect to apply',
        },
      },
      required: ['effect'],
    },
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states the tool sets an effect but doesn't describe what happens (e.g., whether it changes light patterns immediately, requires specific permissions, has side effects on other settings, or what happens if the effect name is invalid). 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, clear sentence with zero wasted words. It's front-loaded with the core action and resource, making it easy to parse quickly. Every word earns its place without redundancy or unnecessary elaboration.

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?

For a mutation tool with no annotations and no output schema, the description is incomplete. It doesn't address what the tool returns, error conditions, or behavioral nuances like whether the effect persists after power cycles. Given the sibling tools include get_effects, more context on effect availability or dependencies would be helpful.

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 input schema has 100% description coverage, with the single parameter 'effect' documented as 'Name of the effect to apply'. The description adds no additional parameter semantics beyond what the schema provides, such as examples of effect names or format requirements. Baseline 3 is appropriate when the schema does the heavy lifting.

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 ('effect on the Nanoleaf lights'), making the purpose immediately understandable. It distinguishes from siblings like set_brightness and set_color by specifying 'effect' rather than other light properties. However, it doesn't specify what an 'effect' entails compared to basic color/brightness changes.

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_brightness. It doesn't mention prerequisites (e.g., whether the device must be connected or turned on first) or indicate what effects are available (though get_effects exists as a sibling). Usage context is implied but not explicitly stated.

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