get_selection_info
Retrieve details about selected clips or time ranges in Adobe Premiere Pro for automation and AI integration workflows.
Instructions
Get information about currently selected clips or time range
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- mcp-server.js:696-748 (handler)Executes the tool logic by fetching selection data from the local HTTP API endpoint at http://localhost:3001/api/selection, processes the response, handles errors, and returns formatted content about selected clips or time range.async getSelectionInfo() { try { const response = await fetch('http://localhost:3001/api/selection'); 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}`, }, ], }; } if (data.selection_type === 'none') { return { content: [ { type: 'text', text: `🎯 **Selection Info**\n\nNo clips or time range currently selected.`, }, ], }; } const selectedClips = data.selected_clips.map(clip => `• **${clip.clip_name}** (${clip.track_type}${clip.track_number})` ).join('\n'); return { content: [ { type: 'text', text: `🎯 **Selection Info**\n\n**Type:** ${data.selection_type}\n**Selected Clips:**\n${selectedClips}\n\n**Time Range:** ${data.selection_in} → ${data.selection_out}\n**Duration:** ${data.selection_duration}`, }, ], }; } catch (error) { return { content: [ { type: 'text', text: `❌ **Failed to get selection info**\n\nError: ${error.message}`, }, ], isError: true, }; } }
- mcp-server.js:249-250 (registration)In the tool call request handler switch statement, routes calls to the getSelectionInfo handler method.case 'get_selection_info': return await this.getSelectionInfo();
- mcp-server.js:119-127 (registration)Registers the tool in the list of available tools returned by ListToolsRequestHandler, including name, description, and empty input schema.{ name: "get_selection_info", description: "Get information about currently selected clips or time range", inputSchema: { type: "object", properties: {}, required: [] } },
- mcp-server.js:122-126 (schema)Defines the input schema for the tool, which requires no parameters.inputSchema: { type: "object", properties: {}, required: [] }