reorder_cues
Assign new cue numbers to multiple cues in a cue list on LacyLights MCP Server, enabling precise reordering for theatrical lighting design.
Instructions
Reorder multiple cues by assigning new cue numbers
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cueListId | Yes | Cue list ID containing the cues | |
| cueReordering | Yes | Array of cue ID and new number pairs |
Implementation Reference
- src/tools/cue-tools.ts:1045-1075 (handler)The handler function for the 'reorder_cues' tool. It reorders cues in a specified cue list by updating the cueNumber of each cue using batched GraphQL mutations via the graphqlClient. Returns the list of updated cues with success status.async reorderCues(args: { cueListId: string; cueReordering: Array<{ cueId: string; newCueNumber: number; }>; }) { const { cueListId, cueReordering } = args; try { // Update each cue with its new number const updatePromises = cueReordering.map(({ cueId, newCueNumber }) => this.graphqlClient.updateCue(cueId, { cueNumber: newCueNumber }), ); const updatedCues = await Promise.all(updatePromises); return { cueListId, updatedCues: updatedCues.map((cue: any) => ({ cueId: cue.id, name: cue.name, cueNumber: cue.cueNumber, })), success: true, totalUpdated: updatedCues.length, }; } catch (error) { throw new Error(`Failed to reorder cues: ${error}`); } }