Skip to main content
Glama
lsemenenko

OpenHue MCP Server

by lsemenenko

activate-scene

Use this tool to activate a specific Philips Hue lighting scene by providing the scene name or ID, with optional room name and mode settings. Part of the OpenHue MCP Server for controlling lights via CLI.

Instructions

Activate a specific scene

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoOptional scene mode
nameYesScene name or ID
roomNoOptional room name for the scene

Implementation Reference

  • Handler for 'activate-scene' tool: parses arguments using SceneActionSchema, constructs OpenHue CLI command to activate the scene, executes it via Docker, and returns a success message.
    case "activate-scene": {
      const params = SceneActionSchema.parse(args);
      let command = `set scene "${params.name}"`;
      if (params.room) {
        command += ` --room "${params.room}"`;
      }
      if (params.mode) {
        command += ` --action ${params.mode}`;
      }
      await executeHueCommand(command);
      return {
        content: [
          {
            type: "text",
            text: `Successfully activated scene "${params.name}"`,
          },
        ],
      };
    }
  • Zod schema for validating input parameters of the 'activate-scene' tool: requires scene name, optional room and mode.
    const SceneActionSchema = z.object({
      name: z.string(),
      room: z.string().optional(),
      mode: z.enum(["active", "dynamic", "static"]).optional(),
    });
  • src/index.ts:195-217 (registration)
    Tool registration in ListTools response: defines name, description, and JSON input schema for 'activate-scene'.
    {
      name: "activate-scene",
      description: "Activate a specific scene",
      inputSchema: {
        type: "object",
        properties: {
          name: {
            type: "string",
            description: "Scene name or ID",
          },
          room: {
            type: "string",
            description: "Optional room name for the scene",
          },
          mode: {
            type: "string",
            enum: ["active", "dynamic", "static"],
            description: "Optional scene mode",
          },
        },
        required: ["name"],
      },
    },
  • Helper function to execute OpenHue commands via Docker, used by the 'activate-scene' handler.
    async function executeHueCommand(command: string): Promise<string> {
      try {
        const { stdout, stderr } = await execAsync(buildDockerCommand(command));
        if (stderr) {
          console.error("Command error:", stderr);
          throw new Error(stderr);
        }
        return stdout;
      } catch (error) {
        console.error("Execution error:", error);
        throw error;
      }
    }
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. 'Activate' implies a state-changing operation, but the description doesn't mention what activation entails (does it turn on lights? adjust settings? affect multiple devices?), whether it requires specific permissions, what happens if the scene doesn't exist, or what the expected outcome is. For a mutation tool with zero annotation coverage, this is insufficient.

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 extremely concise at just three words. It's front-loaded with the essential action and resource. There's zero wasted language or redundancy. While it may be too brief for completeness, as a standalone statement it's perfectly efficient.

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 scene activation tool with 3 parameters, no annotations, and no output schema, the description is inadequate. It doesn't explain what scene activation means in this context, what the expected outcome is, how it differs from direct device control, or what happens upon successful/failed activation. The agent would need to guess about the tool's behavior and appropriate usage scenarios.

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%, so the schema already documents all three parameters (name, mode, room) with their descriptions and constraints. The description adds no parameter information beyond what's in the schema. With complete schema coverage, the baseline is 3 even when the description provides no additional parameter context.

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

Purpose3/5

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

The description 'Activate a specific scene' clearly states the action (activate) and resource (scene), making the basic purpose understandable. However, it doesn't differentiate this tool from sibling tools like 'control-light' or 'control-room' - the agent might not understand when to use scene activation versus direct device control. The purpose is clear but lacks sibling differentiation.

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. With sibling tools like 'control-light', 'control-room', and 'get-scenes', the agent needs to know when scene activation is appropriate versus direct device control or scene retrieval. No when-to-use or when-not-to-use guidance is provided.

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

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/lsemenenko/openhue-mcp-server'

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