get_project_media
Retrieve all media items from a Premiere Pro project browser with file details for automation, AI integration, and workflow management.
Instructions
Get all media items in the project browser with file information
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_project_media"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- mcp-server.js:569-610 (handler)The main handler function that fetches project media data from the local HTTP server at localhost:3001/api/project-media, formats it into a readable list of media items (showing first 15 if many), including details like resolution, file size, bin location, usage, and offline status, and returns it as MCP content.
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:92-100 (schema)The tool schema definition in the ListTools response, specifying the name, description, and input schema (no required parameters).
{ name: "get_project_media", description: "Get all media items in the project browser with file information", inputSchema: { type: "object", properties: {}, required: [] } }, - mcp-server.js:240-241 (registration)Registration and dispatch of the tool in the CallToolRequestHandler switch statement, routing calls to the getProjectMedia handler method.
case 'get_project_media': return await this.getProjectMedia();