Skip to main content
Glama

add_audio_keyframes

Adds keyframes to audio levels for dynamic volume changes in Adobe Premiere Pro clips, enabling precise control over audio transitions.

Instructions

Adds keyframes to audio levels for dynamic volume changes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clipIdYesThe ID of the audio clip
keyframesYesArray of keyframe data

Implementation Reference

  • Handler function that implements the tool logic by constructing an ExtendScript to add keyframes to the Volume property of an audio clip's component in Premiere Pro.
    private async addAudioKeyframes(clipId: string, keyframes: Array<{time: number, level: number}>): Promise<any> {
      const script = `
        try {
          var clip = app.project.getClipByID("${clipId}");
          if (!clip) {
            JSON.stringify({
              success: false,
              error: "Clip not found"
            });
            return;
          }
          
          var audioComponent = clip.components[0];
          if (!audioComponent || !audioComponent.properties["Volume"]) {
            JSON.stringify({
              success: false,
              error: "Audio component not found or clip has no audio"
            });
            return;
          }
          
          var volumeProperty = audioComponent.properties["Volume"];
          var addedKeyframes = [];
          
          ${keyframes.map(kf => `
          try {
            volumeProperty.addKey(new Time("${kf.time}s"));
            volumeProperty.setValueAtKey(new Time("${kf.time}s"), ${kf.level});
            addedKeyframes.push({ time: ${kf.time}, level: ${kf.level} });
          } catch (e) {
            // Keyframe already exists or invalid time
          }
          `).join('\n')}
          
          JSON.stringify({
            success: true,
            message: "Audio keyframes added successfully",
            clipId: "${clipId}",
            addedKeyframes: addedKeyframes,
            totalKeyframes: addedKeyframes.length
          });
        } catch (e) {
          JSON.stringify({
            success: false,
            error: e.toString()
          });
        }
      `;
      
      return await this.bridge.executeScript(script);
    }
  • Input schema using Zod for validating the tool's parameters: clipId and keyframes array.
      name: 'add_audio_keyframes',
      description: 'Adds keyframes to audio levels for dynamic volume changes.',
      inputSchema: z.object({
        clipId: z.string().describe('The ID of the audio clip'),
        keyframes: z.array(z.object({
          time: z.number().describe('Time in seconds'),
          level: z.number().describe('Audio level in dB')
        })).describe('Array of keyframe data')
      })
    },
  • Registration in the executeTool method's switch statement, dispatching to the handler.
    case 'add_audio_keyframes':
      return await this.addAudioKeyframes(args.clipId, args.keyframes);
  • TypeScript declaration of the handler method.
    private addAudioKeyframes;
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the basic action without behavioral details. It doesn't disclose permissions needed, whether changes are reversible, rate limits, or error handling for invalid inputs like overlapping keyframes, which is insufficient for a mutation tool.

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 purpose without unnecessary words. Every part earns its place by specifying the action, resource, and goal concisely.

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?

For a mutation tool with no annotations and no output schema, the description is incomplete. It lacks details on behavioral traits, error conditions, or return values, leaving significant gaps in understanding how to use it effectively in context.

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 parameters are fully documented in the schema. The description adds no additional meaning beyond implying 'keyframes' are for dynamic volume changes, which aligns with but doesn't expand on schema details, meeting the baseline for high coverage.

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 keyframes') and resource ('audio levels'), specifying it's for dynamic volume changes. It distinguishes from siblings like 'adjust_audio_levels' by focusing on keyframe-based changes rather than general adjustments, though it doesn't explicitly name alternatives.

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 on when to use this tool versus alternatives like 'adjust_audio_levels' is provided. The description implies usage for dynamic volume changes but lacks explicit context, prerequisites, or exclusions, leaving the agent to infer based on tool names alone.

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