Skip to main content
Glama

add_text_overlay

Add customizable text overlays to video timelines in Adobe Premiere Pro. Specify content, position, duration, font, and color, ensuring precise placement and alignment.

Instructions

Adds a text layer (title) over the video timeline.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
alignmentNoText alignment
colorNoThe hex color code for the text, e.g., "#FFFFFF"
durationYesHow long the text should remain on screen in seconds
fontFamilyNoe.g., "Arial", "Times New Roman"
fontSizeNoe.g., 48
positionNoText position on screen
sequenceIdYesThe sequence to add the text to
startTimeYesThe time in seconds when the text should appear
textYesThe text content to display
trackIndexYesThe video track to place the text on

Implementation Reference

  • The main handler function for the 'add_text_overlay' tool. It generates an ExtendScript that creates a new title item in Premiere Pro using app.project.createNewTitle(), configures its text properties (font, size, color, position, alignment), and inserts it as a clip on the specified video track at the given start time with the specified duration.
    private async addTextOverlay(args: any): Promise<any> { const script = ` try { var sequence = app.project.getSequenceByID("${args.sequenceId}"); if (!sequence) { JSON.stringify({ success: false, error: "Sequence not found" }); return; } var track = sequence.videoTracks[${args.trackIndex}]; if (!track) { JSON.stringify({ success: false, error: "Video track not found" }); return; } // Create a text clip using the legacy title system var titleItem = app.project.createNewTitle("${args.text}"); if (!titleItem) { JSON.stringify({ success: false, error: "Failed to create title" }); return; } // Set text properties using the legacy title API var title = titleItem.getText(); if (title) { title.text = "${args.text}"; ${args.fontFamily ? `title.fontFamily = "${args.fontFamily}";` : ''} ${args.fontSize ? `title.fontSize = ${args.fontSize};` : ''} ${args.color ? `title.fillColor = "${args.color}";` : ''} ${args.position ? ` title.horizontalJustification = "${args.alignment || 'center'}"; title.verticalJustification = "center"; ` : ''} } // Insert the title into the timeline var titleClip = track.insertClip(titleItem, new Time("${args.startTime}s")); titleClip.end = new Time(titleClip.start.seconds + ${args.duration}); JSON.stringify({ success: true, message: "Text overlay added successfully", text: "${args.text}", clipId: titleClip.nodeId, startTime: ${args.startTime}, duration: ${args.duration}, trackIndex: ${args.trackIndex} }); } catch (e) { JSON.stringify({ success: false, error: e.toString() }); } `; return await this.bridge.executeScript(script); }
  • The Zod input schema definition and tool metadata (name, description) for 'add_text_overlay', registered in the getAvailableTools() method.
    name: 'add_text_overlay', description: 'Adds a text layer (title) over the video timeline.', inputSchema: z.object({ text: z.string().describe('The text content to display'), sequenceId: z.string().describe('The sequence to add the text to'), trackIndex: z.number().describe('The video track to place the text on'), startTime: z.number().describe('The time in seconds when the text should appear'), duration: z.number().describe('How long the text should remain on screen in seconds'), fontFamily: z.string().optional().describe('e.g., "Arial", "Times New Roman"'), fontSize: z.number().optional().describe('e.g., 48'), color: z.string().optional().describe('The hex color code for the text, e.g., "#FFFFFF"'), position: z.object({ x: z.number().optional().describe('Horizontal position (0-100)'), y: z.number().optional().describe('Vertical position (0-100)') }).optional().describe('Text position on screen'), alignment: z.enum(['left', 'center', 'right']).optional().describe('Text alignment') }) },
  • The switch case in executeTool() that registers and dispatches calls to the addTextOverlay handler.
    case 'add_text_overlay': return await this.addTextOverlay(args); case 'add_shape':
  • TypeScript declaration of the addTextOverlay method in the built tools index.
    private addTextOverlay;

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