Skip to main content
Glama

duplicate_sequence

Duplicates a sequence in Adobe Premiere Pro with a new name, enabling efficient workflow management and content replication within video editing projects.

Instructions

Creates a copy of an existing sequence with a new name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
newNameYesThe name for the new sequence copy
sequenceIdYesThe ID of the sequence to duplicate

Implementation Reference

  • The handler function that implements the core logic of the 'duplicate_sequence' tool. It generates an ExtendScript that retrieves the original sequence by ID, clones it using Premiere Pro's API, renames the clone, and returns the new sequence ID.
    private async duplicateSequence(sequenceId: string, newName: string): Promise<any> { const script = ` try { var originalSeq = app.project.getSequenceByID("${sequenceId}"); if (!originalSeq) { JSON.stringify({ success: false, error: "Sequence not found" }); return; } var newSeq = originalSeq.clone(); newSeq.name = "${newName}"; JSON.stringify({ success: true, originalSequenceId: "${sequenceId}", newSequenceId: newSeq.sequenceID, newName: "${newName}" }); } catch (e) { JSON.stringify({ success: false, error: e.toString() }); } `; return await this.bridge.executeScript(script); }
  • Zod input schema defining the required parameters: sequenceId (string) and newName (string). Used for validation in executeTool.
    inputSchema: z.object({ sequenceId: z.string().describe('The ID of the sequence to duplicate'), newName: z.string().describe('The name for the new sequence copy') })
  • Tool registration in the getAvailableTools() method, defining the tool's name, description, and input schema for discovery by MCP clients.
    name: 'duplicate_sequence', description: 'Creates a copy of an existing sequence with a new name.', inputSchema: z.object({ sequenceId: z.string().describe('The ID of the sequence to duplicate'), newName: z.string().describe('The name for the new sequence copy') }) },
  • Dispatch/registration in the executeTool switch statement, mapping the tool name to the handler function call.
    case 'duplicate_sequence': return await this.duplicateSequence(args.sequenceId, args.newName);

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/hetpatel-11/Adobe_Premiere_Pro_MCP'

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