Skip to main content
Glama
lenvolk
by lenvolk

pulse_effect

Create a pulsing color effect on LIFX smart lights by cycling between colors with adjustable timing, brightness, and duration for dynamic lighting.

Instructions

Perform a pulse effect

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenYesLIFX API token
selectorNoSelector for filtering lights (default: 'all')
colorYesColor to pulse
from_colorNoStarting color
periodNoDuration of one cycle in seconds
cyclesNoNumber of cycles
persistNoPersist the final color
power_onNoTurn on if off
peakNoPeak brightness (0.0 to 1.0)

Implementation Reference

  • The main handler for the 'pulse_effect' tool. It extracts parameters from the input arguments, constructs the request body, makes a POST request to the LIFX API endpoint `/lights/{selector}/effects/pulse`, and returns a formatted success message with the API response.
    case "pulse_effect": {
      const { token, selector = "all", ...effectParams } = args as {
        token: string;
        selector?: string;
        color: string;
        from_color?: string;
        period?: number;
        cycles?: number;
        persist?: boolean;
        power_on?: boolean;
        peak?: number;
      };
    
      const body = Object.fromEntries(
        Object.entries(effectParams).filter(([_, value]) => value !== undefined)
      );
    
      const result = await makeLIFXRequest(`/lights/${selector}/effects/pulse`, {
        method: "POST",
        body,
        token,
      });
    
      return {
        content: [
          {
            type: "text",
            text: `Pulse effect started for selector "${selector}". ${JSON.stringify(result, null, 2)}`,
          },
        ],
      };
    }
  • The input schema defining the parameters, types, descriptions, and required fields for the 'pulse_effect' tool.
    inputSchema: {
      type: "object",
      properties: {
        token: { type: "string", description: "LIFX API token" },
        selector: { type: "string", description: "Selector for filtering lights (default: 'all')" },
        color: { type: "string", description: "Color to pulse" },
        from_color: { type: "string", description: "Starting color" },
        period: { type: "number", minimum: 0.1, description: "Duration of one cycle in seconds" },
        cycles: { type: "number", minimum: 1, description: "Number of cycles" },
        persist: { type: "boolean", description: "Persist the final color" },
        power_on: { type: "boolean", description: "Turn on if off" },
        peak: { type: "number", minimum: 0, maximum: 1, description: "Peak brightness (0.0 to 1.0)" },
      },
      required: ["token", "color"],
    },
  • src/index.ts:204-222 (registration)
    The tool registration object that includes the name, description, and input schema, returned by the ListTools handler.
    {
      name: "pulse_effect",
      description: "Perform a pulse effect",
      inputSchema: {
        type: "object",
        properties: {
          token: { type: "string", description: "LIFX API token" },
          selector: { type: "string", description: "Selector for filtering lights (default: 'all')" },
          color: { type: "string", description: "Color to pulse" },
          from_color: { type: "string", description: "Starting color" },
          period: { type: "number", minimum: 0.1, description: "Duration of one cycle in seconds" },
          cycles: { type: "number", minimum: 1, description: "Number of cycles" },
          persist: { type: "boolean", description: "Persist the final color" },
          power_on: { type: "boolean", description: "Turn on if off" },
          peak: { type: "number", minimum: 0, maximum: 1, description: "Peak brightness (0.0 to 1.0)" },
        },
        required: ["token", "color"],
      },
    },
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but only states the action ('Perform a pulse effect'). It doesn't describe what a pulse effect does (e.g., flashing lights with color transitions), whether it's destructive, requires authentication (implied by token parameter but not stated), has rate limits, or what happens on success/failure. This leaves critical behavioral traits undocumented.

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

Conciseness2/5

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

While concise with only three words, the description is under-specified rather than efficiently informative. It fails to front-load essential context (e.g., that this affects LIFX lights) and doesn't use its brevity to convey meaningful guidance, making it ineffective despite its short length.

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 tool with 9 parameters, no annotations, and no output schema, the description is severely incomplete. It doesn't explain the tool's purpose in context, behavioral implications, or usage relative to siblings, leaving the agent with inadequate information to invoke it correctly despite the well-documented schema.

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?

Schema description coverage is 100%, providing clear documentation for all 9 parameters. The description adds no parameter semantics beyond what's in the schema, so it meets the baseline score of 3. However, it doesn't compensate for any gaps since there are none in the schema.

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

Purpose2/5

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

The description 'Perform a pulse effect' is a tautology that restates the tool name without specifying what resource is affected or what the effect entails. It doesn't distinguish this tool from sibling effects like 'breathe_effect' or clarify that it operates on LIFX lights, leaving the purpose vague beyond the name.

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

Usage Guidelines1/5

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

No guidance is provided on when to use this tool versus alternatives like 'breathe_effect' or 'activate_scene'. The description offers no context, prerequisites, or exclusions, making it impossible for an agent to determine appropriate usage scenarios without external knowledge.

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/lenvolk/mcp-lifx'

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