get_project_media
Retrieve all media items and their file details from the project browser in Premiere Pro for automation, AI integration, or advanced workflow control.
Instructions
Get all media items in the project browser with file information
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- mcp-server.js:569-610 (handler)The main handler function that executes the 'get_project_media' tool. It fetches media items from the project via a local HTTP server (port 3001), processes the data, limits to first 15 items, formats a detailed list including file names, resolutions, sizes, bin locations, usage, and offline status, and returns it in MCP content format. Handles errors gracefully.async getProjectMedia() { try { const response = await fetch('http://localhost:3001/api/project-media'); if (!response.ok) throw new Error(`HTTP ${response.status}: ${response.statusText}`); const data = await response.json(); if (data.error) { return { content: [ { type: 'text', text: `⚠️ ${data.error}`, }, ], }; } const mediaList = data.media_items.slice(0, 15).map(media => `• **${media.file_name}** (${media.duration})\n 📐 ${media.resolution.width}x${media.resolution.height} @ ${media.frame_rate}fps\n 💾 ${media.file_size_mb}MB | 🎵 ${media.audio_channels}ch @ ${media.audio_sample_rate}Hz\n 📁 ${media.bin_location} | Used: ${media.usage_count}x ${media.is_offline ? '❌ OFFLINE' : '✅'}` ).join('\n\n'); return { content: [ { type: 'text', text: `📁 **Project Media (${data.total_media_count} items${data.total_media_count > 15 ? ', showing first 15' : ''})**\n\n${mediaList}\n\n**Total Duration:** ${data.total_duration}\n**Offline Media:** ${data.offline_media_count} items`, }, ], }; } catch (error) { return { content: [ { type: 'text', text: `❌ **Failed to get project media**\n\nError: ${error.message}`, }, ], isError: true, }; } }
- mcp-server.js:240-241 (registration)Tool dispatch registration in the CallToolRequestSchema handler switch statement, which calls the getProjectMedia method when the tool is invoked.case 'get_project_media': return await this.getProjectMedia();
- mcp-server.js:92-100 (registration)Tool registration in the ListToolsRequestSchema response, defining the tool name, description, and empty input schema (no parameters required).{ name: "get_project_media", description: "Get all media items in the project browser with file information", inputSchema: { type: "object", properties: {}, required: [] } },
- mcp-server.js:95-99 (schema)Input schema definition for the get_project_media tool, specifying an empty object (no input parameters required).inputSchema: { type: "object", properties: {}, required: [] }