Skip to main content
Glama

trim_clip

Adjust in and out points to shorten video clips on the timeline. Use this tool to precisely control clip duration by setting new start and end times.

Instructions

Adjusts the in and out points of a clip on the timeline, effectively shortening it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clipIdYesThe ID of the clip on the timeline to trim
inPointNoThe new in point in seconds from the start of the clip
outPointNoThe new out point in seconds from the start of the clip
durationNoAlternative: set the desired duration in seconds

Implementation Reference

  • The core handler function for the 'trim_clip' tool. It constructs and executes an ExtendScript via the PremiereProBridge to locate the clip by ID and adjust its inPoint, outPoint, or set a new duration by modifying the outPoint accordingly. Returns detailed before/after timing information.
    private async trimClip(clipId: string, inPoint?: number, outPoint?: number, duration?: number): Promise<any> {
      const script = `
        try {
          var clip = app.project.getClipByID("${clipId}");
          if (!clip) {
            JSON.stringify({
              success: false,
              error: "Clip not found"
            });
            return;
          }
          
          var oldInPoint = clip.inPoint.seconds;
          var oldOutPoint = clip.outPoint.seconds;
          var oldDuration = clip.duration.seconds;
          
          ${inPoint !== undefined ? `clip.inPoint = new Time("${inPoint}s");` : ''}
          ${outPoint !== undefined ? `clip.outPoint = new Time("${outPoint}s");` : ''}
          ${duration !== undefined ? `clip.outPoint = new Time(clip.inPoint.seconds + ${duration});` : ''}
          
          JSON.stringify({
            success: true,
            message: "Clip trimmed successfully",
            clipId: "${clipId}",
            oldInPoint: oldInPoint,
            oldOutPoint: oldOutPoint,
            oldDuration: oldDuration,
            newInPoint: clip.inPoint.seconds,
            newOutPoint: clip.outPoint.seconds,
            newDuration: clip.duration.seconds
          });
        } catch (e) {
          JSON.stringify({
            success: false,
            error: e.toString()
          });
        }
      `;
      
      return await this.bridge.executeScript(script);
    }
  • The tool definition including name, description, and Zod input schema validation for 'trim_clip'. This is returned by getAvailableTools() for MCP tool discovery.
    {
      name: 'trim_clip',
      description: 'Adjusts the in and out points of a clip on the timeline, effectively shortening it.',
      inputSchema: z.object({
        clipId: z.string().describe('The ID of the clip on the timeline to trim'),
        inPoint: z.number().optional().describe('The new in point in seconds from the start of the clip'),
        outPoint: z.number().optional().describe('The new out point in seconds from the start of the clip'),
        duration: z.number().optional().describe('Alternative: set the desired duration in seconds')
      })
    },
  • The dispatch/registration of the 'trim_clip' tool within the central executeTool switch statement, mapping the tool name to the trimClip handler invocation.
      return await this.trimClip(args.clipId, args.inPoint, args.outPoint, args.duration);
    case 'split_clip':
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states the tool 'adjusts' and 'shortens' a clip, implying mutation, but lacks details on permissions, reversibility, effects on adjacent clips, or error conditions. This is inadequate for a mutation tool with zero annotation coverage.

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 front-loads the core action and effect. Every word earns its place, with no redundancy or unnecessary elaboration.

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

Completeness3/5

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

Given a mutation tool with no annotations and no output schema, the description is incomplete. It covers the basic purpose but lacks behavioral details, error handling, and output expectations, leaving gaps for safe and effective use by an AI agent.

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 by implying the tool shortens clips, which relates to the parameters, but doesn't provide additional syntax or usage details beyond what the schema specifies.

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

Purpose5/5

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

The description clearly states the specific action ('adjusts the in and out points') and resource ('a clip on the timeline'), with the effect 'effectively shortening it' distinguishing it from sibling tools like 'move_clip' or 'split_clip' that manipulate clips differently.

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 explicit guidance on when to use this tool versus alternatives is provided. The description implies usage for shortening clips but doesn't mention prerequisites, exclusions, or comparisons to tools like 'split_clip' or 'speed_change' that might serve overlapping purposes.

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