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}`);
      }

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior2/5

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

No annotations are provided, and the description does not disclose important behavioral traits such as atomicity, error handling on partial failures, or potential rate limits. The description only indicates a write operation without further context.

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, clear sentence with no extraneous words. It efficiently conveys the tool's purpose without unnecessary elaboration.

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?

The description lacks important contextual details for a bulk creation tool, such as maximum batch size, result format, or how errors are reported. No output schema is provided, so the agent has no information about the expected response.

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?

With 100% schema description coverage, the baseline is 3. The description adds minimal meaning beyond the schema, merely restating 'descriptions and repositories' without elaborating on the optional 'branch' field. The schema already documents the parameter structure adequately.

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 action ('Create'), the resource ('multiple tasks'), and the input source ('list of descriptions and repositories'). It effectively distinguishes from the sibling tool jules_create_task by emphasizing bulk creation.

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 a use case for creating multiple tasks at once, but it does not explicitly state when to use this tool versus alternatives like jules_create_task for single tasks. No guidance on when not to use it is provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.