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
| Name | Required | Description | Default |
|---|---|---|---|
| taskId | Yes | Task ID or full Jules task URL |
Implementation Reference
- src/index.ts:1320-1386 (handler)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}`); } }
- src/index.ts:145-157 (schema)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':
- src/index.ts:46-58 (schema)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[]; }
- src/index.ts:1236-1242 (helper)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; }