Skip to main content
Glama
bbernstein

LacyLights MCP Server

by bbernstein

analyze_fixture_capabilities

Evaluate lighting fixture capabilities in LacyLights MCP Server for color mixing, positioning, effects, or general analysis using single or multiple fixture IDs.

Instructions

Analyze specific fixtures to understand their lighting capabilities

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
analysisTypeNoType of capability analysisgeneral
fixtureIdNoSingle fixture ID to analyze
fixtureIdsNoMultiple fixture IDs to analyze

Implementation Reference

  • Main handler function that fetches fixtures, extracts capabilities, performs analysis based on type (color_mixing, positioning, effects, general), and returns structured results with summary.
    async analyzeFixtureCapabilities(
      args: z.infer<typeof AnalyzeFixtureCapabilitiesSchema>,
    ) {
      const { fixtureId, fixtureIds, analysisType } =
        AnalyzeFixtureCapabilitiesSchema.parse(args);
    
      try {
        let targetFixtures: FixtureInstance[] = [];
    
        if (fixtureId) {
          // Get fixture from any project (we'll need to search)
          const projects = await this.graphqlClient.getProjects();
          for (const project of projects) {
            const fixture = project.fixtures.find((f) => f.id === fixtureId);
            if (fixture) {
              targetFixtures = [fixture];
              break;
            }
          }
        } else if (fixtureIds) {
          const projects = await this.graphqlClient.getProjects();
          targetFixtures = projects
            .flatMap((p) => p.fixtures)
            .filter((f) => fixtureIds.includes(f.id));
        } else {
          throw new Error("Either fixtureId or fixtureIds must be provided");
        }
    
        if (targetFixtures.length === 0) {
          throw new Error("No fixtures found with the provided IDs");
        }
    
        const analysis = targetFixtures.map((fixture) => {
          const capabilities = this.extractFixtureCapabilities(fixture);
    
          switch (analysisType) {
            case "color_mixing":
              return this.analyzeColorCapabilities(fixture, capabilities);
            case "positioning":
              return this.analyzePositioningCapabilities(fixture, capabilities);
            case "effects":
              return this.analyzeEffectCapabilities(fixture, capabilities);
            default:
              return this.analyzeGeneralCapabilities(fixture, capabilities);
          }
        });
    
        return {
          analysisType,
          fixtures: analysis,
          summary: this.generateCapabilitySummary(analysis, analysisType),
        };
      } catch (error) {
        throw new Error(`Failed to analyze fixture capabilities: ${error}`);
      }
    }
  • Zod input schema defining parameters: single fixtureId or array fixtureIds, optional analysisType (defaults to general). Used for validation in handler.
    const AnalyzeFixtureCapabilitiesSchema = z.object({
      fixtureId: z.string().optional(),
      fixtureIds: z.array(z.string()).optional(),
      analysisType: z
        .enum(["color_mixing", "positioning", "effects", "general"])
        .default("general"),
    });
  • src/index.ts:309-333 (registration)
    Tool registration in ListToolsRequestHandler: defines name, description, and inputSchema matching the Zod schema.
    {
      name: "analyze_fixture_capabilities",
      description:
        "Analyze specific fixtures to understand their lighting capabilities",
      inputSchema: {
        type: "object",
        properties: {
          fixtureId: {
            type: "string",
            description: "Single fixture ID to analyze",
          },
          fixtureIds: {
            type: "array",
            items: { type: "string" },
            description: "Multiple fixture IDs to analyze",
          },
          analysisType: {
            type: "string",
            enum: ["color_mixing", "positioning", "effects", "general"],
            default: "general",
            description: "Type of capability analysis",
          },
        },
      },
    },
  • src/index.ts:1924-1938 (registration)
    Handler dispatch in CallToolRequestHandler: routes calls to FixtureTools.analyzeFixtureCapabilities method.
    case "analyze_fixture_capabilities":
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(
              await this.fixtureTools.analyzeFixtureCapabilities(
                args as any,
              ),
              null,
              2,
            ),
          },
        ],
      };
  • Core helper that extracts capability flags (color, movement, effects, etc.) from fixture channels. Used by all analysis types.
    private extractFixtureCapabilities(fixture: FixtureInstance) {
      // Use mode-specific channels if available, otherwise fall back to definition channels
      let channelTypes: string[];
      let channelCount: number;
      
      // Debug info (temporarily embedded in response)
      const debugInfo = {
        fixtureName: fixture.name,
        hasMode: !!fixture.modeName,
        modeName: fixture.modeName,
        modeChannelCount: fixture.channelCount,
        modeChannelsLength: fixture.channels?.length,
        definitionChannelsLength: fixture.channels.length
      };
      
      if (fixture.channels && fixture.channels.length > 0) {
        // Use mode-specific channels
        channelTypes = fixture.channels.map((ch: any) => ch.type);
        channelCount = fixture.channelCount;
      } else {
        // Fall back to fixture channels
        channelTypes = fixture.channels.map((ch) => ch.type);
        channelCount = fixture.channels.length;
      }
    
      return {
        hasColor: channelTypes.some((t) =>
          ["RED", "GREEN", "BLUE", "WHITE", "AMBER", "UV"].includes(t),
        ),
        hasRGB: ["RED", "GREEN", "BLUE"].every((color) =>
          channelTypes.includes(color as any),
        ),
        hasWhite: channelTypes.includes("WHITE" as any),
        hasAmber: channelTypes.includes("AMBER" as any),
        hasUV: channelTypes.includes("UV" as any),
        hasMovement: channelTypes.some((t) => ["PAN", "TILT"].includes(t)),
        hasPan: channelTypes.includes("PAN" as any),
        hasTilt: channelTypes.includes("TILT" as any),
        hasIntensity: channelTypes.includes("INTENSITY" as any),
        hasZoom: channelTypes.includes("ZOOM" as any),
        hasFocus: channelTypes.includes("FOCUS" as any),
        hasGobo: channelTypes.includes("GOBO" as any),
        hasColorWheel: channelTypes.includes("COLOR_WHEEL" as any),
        hasStrobe: channelTypes.includes("STROBE" as any),
        hasEffects: channelTypes.includes("EFFECT" as any),
        hasMacros: channelTypes.includes("MACRO" as any),
        channelTypes: channelTypes,
        channelCount: channelCount,
        // Temporary debug info
        _debug_extractCapabilities: debugInfo,
      };
    }
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 'analyze' and 'understand capabilities,' which suggests a read-only operation, but doesn't specify if it requires permissions, has rate limits, or what the output format is (e.g., textual report, structured data). For a tool with no annotations, this leaves significant gaps in understanding its behavior and constraints.

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 front-loads the core purpose ('analyze specific fixtures') and adds clarifying detail ('to understand their lighting capabilities'). There is no wasted wording, repetition, or unnecessary elaboration, making it appropriately sized for its informational content.

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 complexity (analysis tool with 3 parameters), no annotations, and no output schema, the description is incomplete. It doesn't explain what 'lighting capabilities' means in practice, how results are returned, or any behavioral traits like error handling. For a tool that likely produces insights or reports, more context is needed to guide effective use by an AI agent.

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 fully documents the three parameters (analysisType, fixtureId, fixtureIds) with descriptions and an enum for analysisType. The description adds no additional meaning beyond the schema, such as explaining how 'fixtureId' and 'fixtureIds' interact or what 'lighting capabilities' entail. Baseline 3 is appropriate as 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 ('analyze') and resource ('specific fixtures'), specifying the purpose is to 'understand their lighting capabilities.' It distinguishes from siblings like 'get_fixture_inventory' or 'create_fixture_instance' by focusing on analysis rather than retrieval or creation. However, it doesn't explicitly differentiate from 'analyze_cue_structure' or 'analyze_script,' which might involve different resources.

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. It doesn't mention prerequisites, such as needing fixture IDs from 'get_fixture_inventory,' or compare to siblings like 'analyze_cue_structure' for different analysis types. Usage is implied through the action and resource but lacks explicit context or exclusions.

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/bbernstein/lacylights-mcp'

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