Skip to main content
Glama

jules_get_task

Retrieve detailed information about a specific Google Jules AI coding task using its unique ID or URL to access task specifications and progress status.

Instructions

Get details of a specific Jules task by ID or URL

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskIdYesTask ID or full Jules task URL

Implementation Reference

  • Main handler implementation for 'jules_get_task'. Navigates to the Jules task page in a browser (Playwright), extracts status, chat history, source files using DOM selectors, updates local JSON data persistence, and returns formatted task summary.
    private async getTask(args: any) {
      const { taskId } = args;
      const actualTaskId = this.extractTaskId(taskId);
      const page = await this.getPage();
    
      try {
        // Navigate to task
        const url = taskId.includes('jules.google.com') ? taskId : `${this.config.baseUrl}/task/${actualTaskId}`;
        await page.goto(url);
        await page.waitForLoadState('networkidle');
    
        // Extract task information
        const taskData = await page.evaluate(() => {
          // Extract chat messages
          const chatMessages = Array.from(document.querySelectorAll('div.chat-content')).map(el => ({
            content: el.textContent?.trim() || '',
            timestamp: new Date().toISOString(),
            type: 'system' as const
          }));
    
          // Extract source files
          const sourceFiles = Array.from(document.querySelectorAll('div.source-content a')).map(link => ({
            filename: link.textContent?.trim() || '',
            url: link.getAttribute('href') || '',
            status: 'modified' as const
          }));
    
          // Extract task status
          const statusEl = document.querySelector('.task-status, [data-status], .status');
          const status = statusEl?.textContent?.toLowerCase() || 'unknown';
    
          return {
            chatMessages,
            sourceFiles,
            status
          };
        });
    
        // Update local data
        const data = await this.loadTaskData();
        let task = data.tasks.find(t => t.id === actualTaskId);
        
        if (task) {
          task.chatHistory = taskData.chatMessages;
          task.sourceFiles = taskData.sourceFiles;
          task.updatedAt = new Date().toISOString();
          await this.saveTaskData(data);
        }
    
        return {
          content: [
            {
              type: 'text',
              text: `Task Details (${actualTaskId}):\n\n` +
                    `Status: ${taskData.status}\n` +
                    `URL: ${url}\n` +
                    `Source Files (${taskData.sourceFiles.length}):\n` +
                    taskData.sourceFiles.map(f => `  - ${f.filename}`).join('\n') +
                    `\n\nRecent Chat Messages (${taskData.chatMessages.length}):\n` +
                    taskData.chatMessages.slice(-3).map(m => `  - ${m.content.slice(0, 100)}...`).join('\n')
            }
          ]
        };
      } catch (error) {
        throw new Error(`Failed to get task: ${error}`);
      }
    }
  • Input schema/JSON Schema definition for the jules_get_task tool, specifying required 'taskId' parameter.
      name: 'jules_get_task',
      description: 'Get details of a specific Jules task by ID or URL',
      inputSchema: {
        type: 'object',
        properties: {
          taskId: {
            type: 'string',
            description: 'Task ID or full Jules task URL',
          },
        },
        required: ['taskId'],
      },
    },
  • src/index.ts:367-369 (registration)
    Tool registration/dispatch in MCP CallToolRequestSchema handler switch statement, mapping 'jules_get_task' name to getTask implementation.
    case 'jules_get_task':
      return await this.getTask(args);
    case 'jules_send_message':
  • TypeScript interface defining the JulesTask data structure used in tool responses and local persistence.
    interface JulesTask {
      id: string;
      title: string;
      description: string;
      repository: string;
      branch: string;
      status: 'pending' | 'in_progress' | 'completed' | 'paused';
      createdAt: string;
      updatedAt: string;
      url: string;
      chatHistory: ChatMessage[];
      sourceFiles: SourceFile[];
    }
  • Helper function to extract task ID from full URL or raw ID, used in getTask.
    private extractTaskId(taskIdOrUrl: string): string {
      if (taskIdOrUrl.includes('jules.google.com/task/')) {
        const match = taskIdOrUrl.match(/\/task\/([^/]+)/);
        return match ? match[1] : taskIdOrUrl;
      }
      return taskIdOrUrl;
    }

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