Skip to main content
Glama
lsemenenko

OpenHue MCP Server

by lsemenenko

get-rooms

Retrieve details of all rooms or a specific room in your Philips Hue setup using the OpenHue MCP Server. Ideal for managing and controlling room-specific lighting configurations.

Instructions

List all rooms or get details for a specific room

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
roomIdNoOptional room ID or name to get specific room details

Implementation Reference

  • Handler for the 'get-rooms' tool. Constructs an OpenHue 'get room' command, optionally including a specific roomId, appends '--json', executes it using executeHueCommand, and returns the result as text content.
    case "get-rooms": {
      let command = "get room";
      if (args?.roomId) {
        command += ` "${args.roomId}"`;
      }
      command += " --json";
      const result = await executeHueCommand(command);
      return {
        content: [
          {
            type: "text",
            text: result,
          },
        ],
      };
    }
  • src/index.ts:134-146 (registration)
    Registration of the 'get-rooms' tool in the ListTools response, including its name, description, and input schema (optional roomId string).
    {
      name: "get-rooms",
      description: "List all rooms or get details for a specific room",
      inputSchema: {
        type: "object",
        properties: {
          roomId: {
            type: "string",
            description: "Optional room ID or name to get specific room details",
          },
        },
      },
    },
  • Helper function used by get-rooms (and other tools) to execute OpenHue Docker commands and return stdout or throw errors.
    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 the full burden of behavioral disclosure. It mentions the tool's actions (list and get details) but doesn't describe behavioral traits such as whether it's read-only, requires authentication, has rate limits, or what the return format looks like. This is a significant gap for a tool with no annotation coverage.

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 clearly states the tool's dual functionality. It is front-loaded with the core purpose and uses no unnecessary words, 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 the tool's complexity (dual functionality with a parameter), lack of annotations, and no output schema, the description is incomplete. It doesn't cover behavioral aspects like safety, permissions, or return values, leaving gaps that could hinder an AI agent's ability to use the tool effectively.

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 parameter 'roomId' documented as 'Optional room ID or name to get specific room details'. The description adds minimal value beyond the schema by implying the parameter's role in switching between list and details modes, but doesn't provide additional syntax or format details. Baseline 3 is appropriate given high schema coverage.

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 tool's purpose with specific verbs ('List all rooms' and 'get details for a specific room') and identifies the resource ('rooms'). It distinguishes between two modes of operation (list vs. details), though it doesn't explicitly differentiate from sibling tools like 'get-lights' or 'control-room'.

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

Usage Guidelines3/5

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

The description implies usage guidelines by mentioning two scenarios (listing all rooms vs. getting specific details), but it doesn't provide explicit guidance on when to use this tool versus alternatives like 'get-lights' for light information or 'control-room' for room control. No exclusions or prerequisites are 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

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