Skip to main content
Glama
bbernstein

LacyLights MCP Server

by bbernstein

analyze_cue_structure

Examine cue list structure and timing to identify patterns and receive actionable improvement suggestions for theatrical lighting design projects.

Instructions

Analyze the structure and timing of a cue list

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cueListIdYesCue list ID to analyze
includeRecommendationsNoInclude improvement recommendations
projectIdYesProject ID containing the cue list

Implementation Reference

  • The core handler function that performs comprehensive analysis of a cue list's structure, including cue numbering, fade timings, scene usage, follow chains, patterns, potential issues, statistics, and optional recommendations. Calls private helper methods for detailed computations.
    async analyzeCueStructure(args: z.infer<typeof AnalyzeCueStructureSchema>) {
      const { cueListId, projectId, includeRecommendations } =
        AnalyzeCueStructureSchema.parse(args);
    
      try {
        const project = await this.graphqlClient.getProject(projectId);
        if (!project) {
          throw new Error(`Project with ID ${projectId} not found`);
        }
    
        const cueList = project.cueLists.find((cl) => cl.id === cueListId);
        if (!cueList) {
          throw new Error(`Cue list with ID ${cueListId} not found`);
        }
    
        const analysis = {
          cueListId,
          name: cueList.name,
          structure: {
            totalCues: cueList.cues.length,
            cueNumbering: this.analyzeCueNumbering(cueList.cues),
            fadeTimings: this.analyzeFadeTimings(cueList.cues),
            sceneUsage: this.analyzeSceneUsage(cueList.cues, project.scenes),
            followStructure: this.analyzeFollowStructure(cueList.cues),
          },
          patterns: {
            commonFadeTimes: this.findCommonFadeTimes(cueList.cues),
            timingPatterns: this.identifyTimingPatterns(cueList.cues),
            sceneTransitions: this.analyzeSceneTransitions(cueList.cues),
          },
          potentialIssues: this.identifyPotentialIssues(cueList.cues),
          statistics: {
            estimatedRuntime: this.estimateSequenceDuration(cueList.cues),
            manualCues: cueList.cues.filter((cue) => !cue.followTime).length,
            autoCues: cueList.cues.filter((cue) => cue.followTime).length,
            averageCueSpacing: this.calculateAverageCueSpacing(cueList.cues),
          },
        };
    
        if (includeRecommendations) {
          (analysis as any).recommendations = {
            numbering: this.recommendNumberingImprovements(cueList.cues),
            timing: this.recommendTimingImprovements(cueList.cues),
            structure: this.recommendStructureImprovements(cueList.cues),
            safety: this.recommendSafetyConsiderations(cueList.cues),
          };
        }
    
        return analysis;
      } catch (error) {
        throw new Error(`Failed to analyze cue structure: ${error}`);
      }
    }
  • Zod schema defining the input parameters for the analyze_cue_structure tool: required cueListId and projectId, optional includeRecommendations flag.
    const AnalyzeCueStructureSchema = z.object({
      cueListId: z.string(),
      projectId: z.string(),
      includeRecommendations: z.boolean().default(true),
    });
  • src/index.ts:1285-1306 (registration)
    Tool registration in listToolsRequestHandler: defines name, description, and inputSchema matching the zod schema.
      name: "analyze_cue_structure",
      description: "Analyze the structure and timing of a cue list",
      inputSchema: {
        type: "object",
        properties: {
          cueListId: {
            type: "string",
            description: "Cue list ID to analyze",
          },
          projectId: {
            type: "string",
            description: "Project ID containing the cue list",
          },
          includeRecommendations: {
            type: "boolean",
            default: true,
            description: "Include improvement recommendations",
          },
        },
        required: ["cueListId", "projectId"],
      },
    },
  • src/index.ts:2296-2308 (registration)
    Tool handler dispatch in callToolRequestHandler: maps tool name to CueTools.analyzeCueStructure method invocation.
    case "analyze_cue_structure":
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(
              await this.cueTools.analyzeCueStructure(args as any),
              null,
              2,
            ),
          },
        ],
      };
  • src/index.ts:57-61 (registration)
    Instantiation of CueTools class instance used for all cue-related tools, injecting required services.
    this.cueTools = new CueTools(
      this.graphqlClient,
      this.ragService,
      this.aiLightingService,
    );
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. It mentions 'analyze' but doesn't specify whether this is a read-only operation, what permissions are needed, if it's computationally intensive, or what the output format might be. For a tool with no annotations, 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, efficient sentence that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded with the core functionality.

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 no annotations and no output schema, the description is incomplete for a tool that performs analysis. It doesn't explain what the analysis produces (e.g., a report, metrics, or visualizations) or any behavioral aspects like performance characteristics. For a 3-parameter tool with no structured support, this leaves too much unspecified.

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 thoroughly. The description doesn't add any additional meaning about the parameters beyond what's in the schema (e.g., it doesn't explain what 'cue list structure' entails or how recommendations are generated). 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 ('analyze') and the target ('structure and timing of a cue list'), providing a specific verb+resource combination. However, it doesn't explicitly differentiate this tool from sibling tools like 'optimize_cue_timing' or 'get_cue_list_details', which might have overlapping purposes in cue list analysis.

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 siblings like 'optimize_cue_timing' (which might adjust timing) and 'get_cue_list_details' (which might retrieve basic info), there's no indication of when this analysis tool is preferred or what specific context it serves.

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