Skip to main content
Glama

import_folder

Import all media files from a folder into your Premiere Pro project, organizing them in a specified bin with optional subfolder scanning.

Instructions

Imports all media files from a folder into the current Premiere Pro project.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
folderPathYesThe absolute path to the folder containing media files
binNameNoThe name of the bin to import the media into
recursiveNoWhether to import from subfolders recursively

Implementation Reference

  • The main handler function for the 'import_folder' tool. It generates and executes an ExtendScript that recursively imports media files from the specified folder into the Premiere Pro project root or a named bin, collecting imported items and errors.
    private async importFolder(folderPath: string, binName?: string, recursive = false): Promise<any> {
      const script = `
        try {
          var folder = new Folder("${folderPath}");
          var importedItems = [];
          var errors = [];
          
          function importFiles(dir, targetBin) {
            var files = dir.getFiles();
            for (var i = 0; i < files.length; i++) {
              var file = files[i];
              if (file instanceof File) {
                try {
                  var item = targetBin.importFiles([file.fsName]);
                  if (item && item.length > 0) {
                    importedItems.push({
                      name: file.name,
                      path: file.fsName,
                      id: item[0].nodeId
                    });
                  }
                } catch (e) {
                  errors.push({
                    file: file.name,
                    error: e.toString()
                  });
                }
              } else if (file instanceof Folder && ${recursive}) {
                importFiles(file, targetBin);
              }
            }
          }
          
          var targetBin = app.project.rootItem;
          ${binName ? `targetBin = app.project.rootItem.children["${binName}"] || app.project.rootItem;` : ''}
          
          importFiles(folder, targetBin);
          
          JSON.stringify({
            success: true,
            importedItems: importedItems,
            errors: errors,
            totalImported: importedItems.length,
            totalErrors: errors.length
          });
        } catch (e) {
          JSON.stringify({
            success: false,
            error: e.toString()
          });
        }
      `;
      
      return await this.bridge.executeScript(script);
    }
  • Zod schema defining the input parameters for the 'import_folder' tool: folderPath (required string), binName (optional string), recursive (optional boolean).
    inputSchema: z.object({
      folderPath: z.string().describe('The absolute path to the folder containing media files'),
      binName: z.string().optional().describe('The name of the bin to import the media into'),
      recursive: z.boolean().optional().describe('Whether to import from subfolders recursively')
    })
  • Registration of the 'import_folder' tool in the getAvailableTools() array, providing name, description, and input schema.
    {
      name: 'import_folder',
      description: 'Imports all media files from a folder into the current Premiere Pro project.',
      inputSchema: z.object({
        folderPath: z.string().describe('The absolute path to the folder containing media files'),
        binName: z.string().optional().describe('The name of the bin to import the media into'),
        recursive: z.boolean().optional().describe('Whether to import from subfolders recursively')
      })
    },
  • Dispatch case in executeTool() method that routes 'import_folder' calls to the importFolder handler.
    case 'import_folder':
      return await this.importFolder(args.folderPath, args.binName, args.recursive);
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While it states the core action, it lacks important behavioral details: it doesn't specify what happens if the folder doesn't exist, what media formats are supported, whether this operation is destructive to existing project content, what permissions are required, or what the expected outcome looks like. For a tool with 3 parameters and no annotations, this leaves significant gaps in understanding the tool's behavior.

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 communicates the essential purpose without unnecessary words. It's front-loaded with the core action and doesn't waste space on redundant information. Every word serves a clear purpose in conveying the tool's function.

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 3 parameters with 100% schema coverage but no annotations and no output schema, the description provides adequate basic context but has significant gaps. It explains what the tool does at a high level but doesn't address behavioral aspects, error conditions, or expected outcomes. For a media import tool that likely has format constraints and project dependencies, more context would be helpful despite the good parameter documentation.

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?

The schema description coverage is 100%, with all parameters well-documented in the schema itself. The description doesn't add any parameter-specific information beyond what's already in the schema descriptions. This meets the baseline expectation when schema coverage is complete, but doesn't provide additional value through examples, constraints, or usage patterns for the parameters.

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 ('Imports all media files') and target resource ('from a folder into the current Premiere Pro project'), using precise language. It distinguishes itself from sibling tools like 'import_media' by specifying folder-based import rather than individual file import.

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

Usage Guidelines3/5

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

The description implies usage context ('into the current Premiere Pro project') but provides no explicit guidance on when to use this tool versus alternatives like 'import_media'. It doesn't mention prerequisites such as having a project open or specify scenarios where folder import is preferred over individual file import.

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