Skip to main content
Glama
bbernstein

LacyLights MCP Server

by bbernstein

generate_act_cues

Generate lighting cue suggestions for theatrical acts using script analysis. Input project details, act number, and script text to create tailored cue lists for enhanced stage lighting design.

Instructions

Generate cue suggestions for an entire act based on script analysis

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actNumberYesAct number to generate cues for
cueListNameNoOptional name for the cue list
existingScenesNoOptional existing scene IDs to reference
projectIdYesProject ID to work with
scriptTextYesScript text for the act

Implementation Reference

  • Main handler function implementing the generate_act_cues tool. Analyzes script text for a specific act, filters scenes by act number, generates lighting recommendations and cue templates for each scene using RAG service, computes timing/mood analysis, and returns structured cue suggestions with act-level insights.
    async generateActCues(args: z.infer<typeof GenerateActCuesSchema>) {
      const {
        projectId: _projectId,
        actNumber,
        scriptText,
        existingScenes: _existingScenes,
        cueListName,
      } = GenerateActCuesSchema.parse(args);
    
      try {
        // Analyze the script for this act
        const scriptAnalysis = await this.ragService.analyzeScript(scriptText);
    
        // Filter scenes for this act (assuming scene numbers indicate acts)
        const actScenes = scriptAnalysis.scenes.filter((scene) => {
          const sceneNum = parseFloat(scene.sceneNumber);
          return Math.floor(sceneNum) === actNumber;
        });
    
        if (actScenes.length === 0) {
          throw new Error(
            `No scenes found for Act ${actNumber} in the provided script`,
          );
        }
    
        // Generate cue suggestions for each scene in the act
        const cueTemplates = await Promise.all(
          actScenes.map(async (scene, _index) => {
            const recommendations =
              await this.ragService.generateLightingRecommendations(
                scene.content,
                scene.mood,
                ["LED_PAR", "MOVING_HEAD"], // Default fixture types
              );
    
            return {
              sceneNumber: scene.sceneNumber,
              cueName: `Cue ${scene.sceneNumber}`,
              description: scene.title || `Scene ${scene.sceneNumber}`,
              mood: scene.mood,
              timeOfDay: scene.timeOfDay,
              location: scene.location,
              lightingCues: scene.lightingCues,
              suggestedTiming: {
                fadeIn: this.calculateFadeTime(scene.mood, "in"),
                fadeOut: this.calculateFadeTime(scene.mood, "out"),
                autoFollow: scene.lightingCues.some(
                  (cue) =>
                    cue.toLowerCase().includes("auto") ||
                    cue.toLowerCase().includes("follow"),
                ),
              },
              colorSuggestions: recommendations.colorSuggestions,
              intensityLevel: recommendations.intensityLevels,
            };
          }),
        );
    
        return {
          actNumber,
          totalScenes: actScenes.length,
          suggestedCueListName: cueListName || `Act ${actNumber} Cues`,
          cueTemplates,
          actAnalysis: {
            overallMood: this.determineActMood(actScenes),
            keyMoments: this.identifyKeyMoments(actScenes),
            transitionTypes: this.analyzeTransitions(actScenes),
            estimatedDuration: this.estimateActDuration(cueTemplates),
          },
          recommendations: {
            preShowChecks: this.generatePreShowChecklist(cueTemplates),
            criticalCues: this.identifyCriticalCues(cueTemplates),
            backupPlans: this.suggestBackupPlans(cueTemplates),
          },
        };
      } catch (error) {
        throw new Error(`Failed to generate act cues: ${error}`);
      }
    }
  • Zod input validation schema defining parameters: projectId (string), actNumber (number), scriptText (string), existingScenes (optional array of strings), cueListName (optional string). Used for parsing args in the handler.
    const GenerateActCuesSchema = z.object({
      projectId: z.string(),
      actNumber: z.number(),
      scriptText: z.string(),
      existingScenes: z.array(z.string()).optional(),
      cueListName: z.string().optional(),
    });
  • src/index.ts:2268-2280 (registration)
    Dispatch handler in MCP call_tool request that invokes cueTools.generateActCues for tool name 'generate_act_cues'.
    case "generate_act_cues":
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(
              await this.cueTools.generateActCues(args as any),
              null,
              2,
            ),
          },
        ],
      };
  • src/index.ts:1224-1254 (registration)
    Tool registration in MCP list_tools response: defines name 'generate_act_cues', description, and inputSchema matching the handler schema.
      name: "generate_act_cues",
      description:
        "Generate cue suggestions for an entire act based on script analysis",
      inputSchema: {
        type: "object",
        properties: {
          projectId: {
            type: "string",
            description: "Project ID to work with",
          },
          actNumber: {
            type: "number",
            description: "Act number to generate cues for",
          },
          scriptText: {
            type: "string",
            description: "Script text for the act",
          },
          existingScenes: {
            type: "array",
            items: { type: "string" },
            description: "Optional existing scene IDs to reference",
          },
          cueListName: {
            type: "string",
            description: "Optional name for the cue list",
          },
        },
        required: ["projectId", "actNumber", "scriptText"],
      },
    },
  • Instantiation of CueTools class instance used for all cue-related tools including generate_act_cues.
    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?

With no annotations provided, the description carries full burden for behavioral disclosure. It states the tool 'generates' suggestions, implying a read-only or analysis operation, but doesn't clarify whether this creates persistent data, requires specific permissions, or has side effects. No rate limits, error conditions, or output format are mentioned.

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?

For a tool with 5 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what 'cue suggestions' entail, how they're generated from 'script analysis', or what format the output takes. The agent lacks critical context about the tool's behavior and results.

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 parameters thoroughly. The description doesn't add any meaningful parameter context beyond what's in the schema, such as explaining relationships between parameters or providing usage examples.

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 ('generate cue suggestions') and target ('for an entire act based on script analysis'), providing a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'create_cue_sequence' or 'update_cue_list', which appear related to cue management but have different purposes.

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 offers no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, appropriate contexts, or exclusions, leaving the agent to infer usage from the tool name and parameters alone.

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