Skip to main content
Glama
bbernstein
by bbernstein

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

NameRequiredDescriptionDefault
cueListIdYesCue list ID containing the cues
cueReorderingYesArray of cue ID and new number pairs

Input Schema (JSON Schema)

{ "properties": { "cueListId": { "description": "Cue list ID containing the cues", "type": "string" }, "cueReordering": { "description": "Array of cue ID and new number pairs", "items": { "properties": { "cueId": { "description": "ID of the cue to reorder", "type": "string" }, "newCueNumber": { "description": "New cue number for this cue", "type": "number" } }, "required": [ "cueId", "newCueNumber" ], "type": "object" }, "type": "array" } }, "required": [ "cueListId", "cueReordering" ], "type": "object" }

Implementation Reference

  • 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}`); } }

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