create_bin
Organize media in Adobe Premiere Pro by creating new folders in the project panel. Specify a name and optional parent folder 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:105-111 (registration)Registration of the 'create_bin' tool in the getAvailableTools() method, including name, description, and input 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:892-915 (handler)The main handler function for 'create_bin' tool. It constructs and executes an ExtendScript via the PremiereProBridge to create a new bin in the project, optionally in 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:450-451 (handler)Dispatcher case in executeTool method that routes 'create_bin' calls to the createBin handler.case 'create_bin': return await this.createBin(args.name, args.parentBinName);
- src/tools/index.ts:107-110 (schema)Zod input schema for validating arguments to the 'create_bin' tool.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') })