Skip to main content
Glama

add_shape

Add shapes like rectangles, circles, or triangles to Adobe Premiere Pro timelines with precise timing, positioning, and sizing controls.

Instructions

Adds a shape (rectangle, circle, etc.) to the timeline.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
shapeTypeYesThe type of shape to add
sequenceIdYesThe sequence to add the shape to
trackIndexYesThe video track to place the shape on
startTimeYesThe time in seconds when the shape should appear
durationYesHow long the shape should remain on screen in seconds
colorNoThe hex color code for the shape
sizeNoShape size
positionNoShape position on screen

Implementation Reference

  • The handler function that implements the 'add_shape' tool. It constructs and executes an ExtendScript via the bridge to create a shape layer in Premiere Pro using the legacy title system, add properties like color/size/position, and insert it into the specified sequence track.
    private async addShape(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 shape using the legacy title system
          var shapeItem = app.project.createNewTitle("Shape");
          if (!shapeItem) {
            JSON.stringify({
              success: false,
              error: "Failed to create shape"
            });
            return;
          }
          
          // Add shape to title
          var shape = shapeItem.addShape("${args.shapeType}");
          if (shape) {
            ${args.color ? `shape.fillColor = "${args.color}";` : ''}
            ${args.size ? `
            shape.width = ${args.size.width || 100};
            shape.height = ${args.size.height || 100};
            ` : ''}
            ${args.position ? `
            shape.x = ${args.position.x || 50};
            shape.y = ${args.position.y || 50};
            ` : ''}
          }
          
          // Insert the shape into the timeline
          var shapeClip = track.insertClip(shapeItem, new Time("${args.startTime}s"));
          shapeClip.end = new Time(shapeClip.start.seconds + ${args.duration});
          
          JSON.stringify({
            success: true,
            message: "Shape added successfully",
            shapeType: "${args.shapeType}",
            clipId: shapeClip.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);
    }
  • Input schema (Zod) for the 'add_shape' tool, defining parameters like shapeType, sequenceId, trackIndex, startTime, duration, and optional color, size, position.
      name: 'add_shape',
      description: 'Adds a shape (rectangle, circle, etc.) to the timeline.',
      inputSchema: z.object({
        shapeType: z.enum(['rectangle', 'circle', 'triangle']).describe('The type of shape to add'),
        sequenceId: z.string().describe('The sequence to add the shape to'),
        trackIndex: z.number().describe('The video track to place the shape on'),
        startTime: z.number().describe('The time in seconds when the shape should appear'),
        duration: z.number().describe('How long the shape should remain on screen in seconds'),
        color: z.string().optional().describe('The hex color code for the shape'),
        size: z.object({
          width: z.number().optional().describe('Width in pixels'),
          height: z.number().optional().describe('Height in pixels')
        }).optional().describe('Shape size'),
        position: z.object({
          x: z.number().optional().describe('Horizontal position (0-100)'),
          y: z.number().optional().describe('Vertical position (0-100)')
        }).optional().describe('Shape position on screen')
      })
    },
  • Registration of the 'add_shape' tool in the executeTool switch statement, dispatching to the addShape handler.
    return await this.addShape(args);
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool adds shapes but doesn't cover critical aspects like whether this is a mutating operation, permission requirements, error handling, or what happens on success/failure. For a tool with 8 parameters and no annotations, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's front-loaded and wastes no space, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (8 parameters, nested objects, no output schema, and no annotations), the description is insufficient. It doesn't explain return values, error conditions, or the broader context of how shapes integrate with the timeline, leaving the agent with incomplete operational understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all parameters. The description adds minimal value beyond the schema by mentioning shape types (rectangle, circle, etc.), which aligns with the shapeType enum, but doesn't provide additional context like default behaviors or parameter interactions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('adds') and resource ('a shape to the timeline'), specifying shape types like rectangle and circle. It distinguishes from siblings like add_text_overlay or add_transition by focusing on shapes, though it doesn't explicitly contrast with all sibling tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like add_text_overlay or add_to_timeline. The description implies usage for adding shapes to a timeline but offers no context on prerequisites, exclusions, or specific scenarios where this tool is preferred.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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