Skip to main content
Glama

jules_bulk_create_tasks

Create multiple coding tasks simultaneously by providing descriptions and repository details for automated development workflows.

Instructions

Create multiple tasks from a list of descriptions and repositories

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tasksYesArray of task objects to create

Implementation Reference

  • Main handler implementation for jules_bulk_create_tasks. Loops through the array of tasks, calls createTask for each, collects success/failure messages, and returns a summary.
    private async bulkCreateTasks(args: any) {
      const { tasks } = args;
      const results = [];
    
      for (const taskData of tasks) {
        try {
          const result = await this.createTask(taskData);
          results.push(`✓ ${taskData.repository}: ${taskData.description.slice(0, 50)}...`);
        } catch (error) {
          results.push(`✗ ${taskData.repository}: Failed - ${error}`);
        }
      }
    
      return {
        content: [
          {
            type: 'text',
            text: `Bulk Task Creation Results (${tasks.length} tasks):\n\n${results.join('\n')}`
          }
        ]
      };
    }
  • Input schema definition for the tool, specifying an array of task objects each with description, repository (required), and optional branch.
    {
      name: 'jules_bulk_create_tasks',
      description: 'Create multiple tasks from a list of descriptions and repositories',
      inputSchema: {
        type: 'object',
        properties: {
          tasks: {
            type: 'array',
            items: {
              type: 'object',
              properties: {
                description: { type: 'string' },
                repository: { type: 'string' },
                branch: { type: 'string' },
              },
              required: ['description', 'repository'],
            },
            description: 'Array of task objects to create',
          },
        },
        required: ['tasks'],
      },
    },
  • src/index.ts:379-380 (registration)
    Registration in the CallToolRequestSchema handler switch statement that dispatches to the bulkCreateTasks method.
    case 'jules_bulk_create_tasks':
      return await this.bulkCreateTasks(args);
  • Supporting helper function createTask used by bulkCreateTasks to create individual tasks via browser automation on jules.google.com.
    private async createTask(args: any) {
      const { description, repository, branch = 'main' } = args;
      const page = await this.getPage();
    
      try {
        // Navigate to Jules task creation
        await page.goto(`${this.config.baseUrl}/task`);
        await page.waitForLoadState('networkidle');
    
        // Click new task button if needed
        const newTaskButton = page.locator('button.mat-mdc-tooltip-trigger svg');
        if (await newTaskButton.isVisible()) {
          await newTaskButton.click();
        }
    
        // Repository selection
        await page.locator("div.repo-select div.header-container").click();
        await page.locator("div.repo-select input").fill(repository);
        await page.locator("div.repo-select div.opt-list > swebot-option").first().click();
    
        // Branch selection
        await page.locator("div.branch-select div.header-container > div").click();
        
        // Try to find specific branch or select first available
        const branchOptions = page.locator("div.branch-select swebot-option");
        const branchCount = await branchOptions.count();
        if (branchCount > 0) {
          await branchOptions.first().click();
        }
    
        // Task description
        await page.locator("textarea").fill(description);
        await page.keyboard.press('Enter');
    
        // Submit
        await page.locator("div.chat-container button:nth-of-type(2)").click();
    
        // Wait for task creation and get URL
        await page.waitForURL('**/task/**');
        const url = page.url();
        const taskId = this.extractTaskId(url);
    
        // Create task object
        const task: JulesTask = {
          id: taskId,
          title: description.slice(0, 50) + (description.length > 50 ? '...' : ''),
          description,
          repository,
          branch,
          status: 'pending',
          createdAt: new Date().toISOString(),
          updatedAt: new Date().toISOString(),
          url,
          chatHistory: [],
          sourceFiles: []
        };
    
        // Save to data
        const data = await this.loadTaskData();
        data.tasks.push(task);
        await this.saveTaskData(data);
    
        return {
          content: [
            {
              type: 'text',
              text: `Task created successfully!\n\nTask ID: ${taskId}\nRepository: ${repository}\nBranch: ${branch}\nDescription: ${description}\nURL: ${url}\n\nTask is now pending Jules' analysis. You can check progress with jules_get_task.`
            }
          ]
        };
      } catch (error) {
        throw new Error(`Failed to create task: ${error}`);
      }

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/mberjans/google-jules-mcp'

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