Skip to main content
Glama

import_media

Add video, audio, or image files to your Premiere Pro project by specifying file paths and organizing them into bins for efficient editing workflows.

Instructions

Imports a media file (video, audio, image) into the current Premiere Pro project.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYesThe absolute path to the media file to import
binNameNoThe name of the bin to import the media into. If not provided, it will be imported into the root.

Implementation Reference

  • Registration of the 'import_media' MCP tool in getAvailableTools(), defining name, description, and Zod input schema
    { name: 'import_media', description: 'Imports a media file (video, audio, image) into the current Premiere Pro project.', inputSchema: z.object({ filePath: z.string().describe('The absolute path to the media file to import'), binName: z.string().optional().describe('The name of the bin to import the media into. If not provided, it will be imported into the root.') }) },
  • Input schema (Zod) for the import_media tool
    inputSchema: z.object({ filePath: z.string().describe('The absolute path to the media file to import'), binName: z.string().optional().describe('The name of the bin to import the media into. If not provided, it will be imported into the root.') })
  • Primary handler for import_media tool: calls bridge.importMedia and formats response with success/error handling
    private async importMedia(filePath: string, binName?: string): Promise<any> { try { const result = await this.bridge.importMedia(filePath); return { success: true, message: `Media imported successfully`, filePath: filePath, binName: binName || 'Root', ...result }; } catch (error) { return { success: false, error: `Failed to import media: ${error instanceof Error ? error.message : String(error)}`, filePath: filePath }; } }
  • Dispatch case in executeTool that routes import_media calls to the handler method
    case 'import_media': return await this.importMedia(args.filePath, args.binName); case 'import_folder':
  • Core bridge handler: executes ExtendScript via executeScript to import media file into Premiere Pro project and return item details
    async importMedia(filePath: string): Promise<PremiereProProjectItem> { const script = ` // Import media file var file = new File("${filePath}"); var importedItem = app.project.importFiles([file.fsName]); // Return imported item info JSON.stringify({ id: importedItem.nodeId, name: importedItem.name, type: importedItem.type, mediaPath: importedItem.getMediaPath(), duration: importedItem.getOutPoint() - importedItem.getInPoint(), frameRate: importedItem.getVideoFrameRate() }); `; return await this.executeScript(script); }

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