create_bin
Organize media in Adobe Premiere Pro by creating a new bin in the project panel. Specify the bin name and optionally place it inside a parent bin for structured project management.
Instructions
Creates a new bin (folder) in the project panel to organize media.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The name for the new bin | |
| parentBinName | No | The name of the parent bin to create this bin inside |
Implementation Reference
- src/tools/index.ts:892-915 (handler)The handler function for the 'create_bin' tool. It constructs and executes an ExtendScript via the bridge to create a new bin in the Premiere Pro project, optionally under a parent bin.private async createBin(name: string, parentBinName?: string): Promise<any> { const script = ` try { var parentBin = app.project.rootItem; ${parentBinName ? `parentBin = app.project.rootItem.children["${parentBinName}"] || app.project.rootItem;` : ''} var newBin = parentBin.createBin("${name}"); JSON.stringify({ success: true, binName: "${name}", binId: newBin.nodeId, parentBin: parentBinName || "Root" }); } catch (e) { JSON.stringify({ success: false, error: e.toString() }); } `; return await this.bridge.executeScript(script); }
- src/tools/index.ts:107-110 (schema)Zod input schema defining parameters for the create_bin tool: required 'name' and optional 'parentBinName'.inputSchema: z.object({ name: z.string().describe('The name for the new bin'), parentBinName: z.string().optional().describe('The name of the parent bin to create this bin inside') })
- src/tools/index.ts:105-111 (registration)Tool registration in getAvailableTools() array, including name, description, and schema.name: 'create_bin', description: 'Creates a new bin (folder) in the project panel to organize media.', inputSchema: z.object({ name: z.string().describe('The name for the new bin'), parentBinName: z.string().optional().describe('The name of the parent bin to create this bin inside') }) },
- src/tools/index.ts:450-451 (registration)Dispatch/registration in executeTool switch statement that calls the createBin handler.case 'create_bin': return await this.createBin(args.name, args.parentBinName);