Skip to main content
Glama

list_project_items

Discover all media items, bins, and assets in your current Premiere Pro project to identify available content before editing operations.

Instructions

Lists all media items, bins, and assets in the current Premiere Pro project. Use this to discover available media before performing operations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
includeBinsNoWhether to include bin information in the results
includeMetadataNoWhether to include detailed metadata for each item

Implementation Reference

  • The primary handler function for the 'list_project_items' tool. It constructs an ExtendScript that enumerates items in the project root, categorizes them into media items and bins, optionally includes metadata, and returns structured JSON via the Premiere Pro bridge.
    private async listProjectItems(includeBins = true, includeMetadata = false): Promise<any> { const script = ` try { var items = []; var bins = []; // List all project items for (var i = 0; i < app.project.rootItem.children.numItems; i++) { var item = app.project.rootItem.children[i]; var itemInfo = { id: item.nodeId, name: item.name, type: item.type.toString(), path: item.getMediaPath(), duration: item.duration ? item.duration.seconds : null }; if (${includeMetadata}) { itemInfo.metadata = { width: item.getMediaWidth ? item.getMediaWidth() : null, height: item.getMediaHeight ? item.getMediaHeight() : null, frameRate: item.getMediaFrameRate ? item.getMediaFrameRate() : null, hasVideo: item.hasVideo ? item.hasVideo() : false, hasAudio: item.hasAudio ? item.hasAudio() : false }; } if (item.type === ProjectItemType.BIN) { bins.push(itemInfo); } else { items.push(itemInfo); } } JSON.stringify({ success: true, items: items, bins: ${includeBins} ? bins : [], totalItems: items.length, totalBins: bins.length }); } catch (e) { JSON.stringify({ success: false, error: e.toString() }); } `; return await this.bridge.executeScript(script); }
  • Zod input schema definition for the list_project_items tool, specifying optional boolean parameters for including bins and metadata.
    { name: 'list_project_items', description: 'Lists all media items, bins, and assets in the current Premiere Pro project. Use this to discover available media before performing operations.', inputSchema: z.object({ includeBins: z.boolean().optional().describe('Whether to include bin information in the results'), includeMetadata: z.boolean().optional().describe('Whether to include detailed metadata for each item') }) },
  • Tool dispatch registration in the executeTool method's switch statement, mapping the tool name to its handler function.
    case 'list_project_items': return await this.listProjectItems(args.includeBins, args.includeMetadata); case 'list_sequences':
  • src/index.ts:74-81 (registration)
    MCP server registration for listing tools, which exposes the list_project_items tool via PremiereProTools.getAvailableTools().
    this.server.setRequestHandler(ListToolsRequestSchema, async () => { const tools = this.tools.getAvailableTools().map((tool) => ({ name: tool.name, description: tool.description, inputSchema: zodToJsonSchema(tool.inputSchema, { $refStrategy: 'none' }) })); return { tools }; });
  • src/index.ts:84-106 (registration)
    MCP server handler for tool execution calls, delegating to PremiereProTools.executeTool which handles list_project_items.
    this.server.setRequestHandler(CallToolRequestSchema, async (request) => { const { name, arguments: args } = request.params; try { const result = await this.tools.executeTool(name, args || {}); return { content: [ { type: 'text' as const, text: JSON.stringify(result, null, 2) } ] }; } catch (error) { const errorMessage = error instanceof Error ? error.message : 'Unknown error'; this.logger.error(`Tool execution failed: ${errorMessage}`); throw new McpError( ErrorCode.InternalError, `Failed to execute tool '${name}': ${errorMessage}` ); } });

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