Skip to main content
Glama

import_media

Adds a media file (video, audio, image) to your Premiere Pro project by specifying the file path and optional bin name. Simplifies media import for automated workflows.

Instructions

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

Input Schema

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

Implementation Reference

  • The primary MCP tool handler for 'import_media'. It calls the bridge's importMedia method, handles errors, and formats the response with success status and details.
    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 }; } }
  • Tool registration in getAvailableTools() array, defining the tool name, description, and 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.') }) },
  • Zod input schema for validating tool arguments: filePath (required string), binName (optional string).
    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.') }) },
  • Low-level bridge handler that executes ExtendScript to import the media file into the Premiere Pro project and returns project 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