Skip to main content
Glama

batchProcess

Process multiple video tasks simultaneously to clip, merge, or split files in bulk, saving time on repetitive video editing operations.

Instructions

批量处理视频任务

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tasksYes批量任务配置数组

Implementation Reference

  • MCP tool handler for batchProcess: adds tasks to BatchManager queue and returns task IDs.
    private async handleBatchProcess(args: MCPToolParams['batchProcess']) {
      const taskIds = this.batchManager.addTasks(args.tasks);
      const result: MCPToolResults['batchProcess'] = {
        taskIds,
        message: `已添加 ${taskIds.length} 个批量任务到处理队列`
      };
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • Registration of batchProcess tool in getToolDefinitions(), including input schema.
    {
      name: 'batchProcess',
      description: '批量处理视频任务',
      inputSchema: {
        type: 'object',
        properties: {
          tasks: {
            type: 'array',
            items: {
              type: 'object',
              properties: {
                type: {
                  type: 'string',
                  enum: ['clip', 'merge', 'split'],
                  description: '任务类型'
                },
                options: {
                  type: 'object',
                  description: '任务参数'
                }
              },
              required: ['type', 'options']
            },
            description: '批量任务配置数组'
          }
        },
        required: ['tasks']
      }
    },
  • TypeScript interface definition for batchProcess input parameters (MCPToolParams).
    // 批量处理工具参数
    batchProcess: {
      tasks: Omit<BatchTask, 'id' | 'status' | 'createdAt'>[];
    };
  • TypeScript interface definition for batchProcess output result (MCPToolResults).
    batchProcess: {
      taskIds: string[];
      message: string;
    };
  • Core helper method addTasks in BatchManager that creates and queues batch tasks, triggers processing.
    public addTasks(taskConfigs: Omit<BatchTask, 'id' | 'status' | 'createdAt'>[]): string[] {
      const taskIds: string[] = [];
    
      for (const config of taskConfigs) {
        const taskId = uuidv4();
        const task: BatchTask = {
          id: taskId,
          type: config.type,
          options: config.options,
          status: 'pending',
          createdAt: new Date()
        };
    
        this.tasks.set(taskId, task);
        this.processingQueue.push(taskId);
        taskIds.push(taskId);
      }
    
      // 开始处理队列
      this.processQueue();
    
      return taskIds;
    }
Behavior1/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. The description only states '批量处理视频任务' without explaining what happens during processing, whether it's synchronous/asynchronous, if it returns status information, what errors might occur, or any rate limits. For a batch processing tool with no annotation coverage, this is completely inadequate.

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 extremely concise with just one Chinese phrase ('批量处理视频任务'). While this may be too brief for completeness, as pure conciseness it's maximally efficient with zero wasted words. The single phrase is front-loaded with the core concept.

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 this is a batch processing tool with no annotations, no output schema, and multiple sibling tools for individual operations, the description is insufficient. It doesn't explain the relationship to sibling tools, what the tool returns, how to monitor progress, or error handling. For a tool that presumably orchestrates multiple video operations, more context is needed.

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 already documents the single 'tasks' parameter with its structure. The description doesn't add any meaning beyond what the schema provides about task types or options. With high schema coverage, the baseline is 3 even without additional parameter information in the description.

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

Purpose3/5

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

The description '批量处理视频任务' (batch process video tasks) states a general purpose but lacks specificity. It mentions 'video tasks' but doesn't clarify what types of tasks or distinguish from sibling tools like clipVideo, mergeVideos, and splitVideo which handle individual operations. The purpose is vague rather than specific.

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. The description doesn't mention prerequisites, when batch processing is appropriate, or how it relates to sibling tools like clipVideo, mergeVideos, and splitVideo which handle similar operations individually. There's no explicit or implied usage context.

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/pickstar-2002/video-clip-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server