Skip to main content
Glama

jules_resume_task

Resume paused Google Jules AI coding tasks by providing the task ID or URL to continue development workflows and automation processes.

Instructions

Resume a paused Jules task

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskIdYesTask ID or URL

Implementation Reference

  • The main handler function for the 'jules_resume_task' tool. It extracts the task ID, navigates to the task page using Playwright, locates and clicks the resume button if visible, and returns an appropriate success or informational message.
    private async resumeTask(args: any) { const { taskId } = args; const actualTaskId = this.extractTaskId(taskId); const page = await this.getPage(); try { const url = taskId.includes('jules.google.com') ? taskId : `${this.config.baseUrl}/task/${actualTaskId}`; await page.goto(url); await page.waitForLoadState('networkidle'); // Look for resume button const resumeButton = page.locator("div.resume-button-container svg"); if (await resumeButton.isVisible()) { await resumeButton.click(); return { content: [ { type: 'text', text: `Task ${actualTaskId} resumed successfully. Jules will continue working on this task.` } ] }; } else { return { content: [ { type: 'text', text: `Task ${actualTaskId} doesn't appear to be paused or may already be active.` } ] }; } } catch (error) { throw new Error(`Failed to resume task: ${error}`); } }
  • The input schema definition for the 'jules_resume_task' tool, specifying that it requires a 'taskId' string parameter (which can be a task ID or full URL). This is returned by the ListTools MCP request.
    { name: 'jules_resume_task', description: 'Resume a paused Jules task', inputSchema: { type: 'object', properties: { taskId: { type: 'string', description: 'Task ID or URL', }, }, required: ['taskId'], }, },
  • src/index.ts:373-374 (registration)
    The registration of the 'jules_resume_task' tool handler within the CallToolRequestSchema switch statement, mapping the tool name to the resumeTask method.
    case 'jules_resume_task': return await this.resumeTask(args);
  • Client-side helper function that invokes the 'jules_resume_task' MCP tool, validates prerequisites, handles the response, and updates local task storage.
    def resume_task(manager: Dict[str, Any], task_id: str) -> bool: """Resume a paused task via MCP and update local storage.""" validated_id = _validate_task_identifier(task_id) mcp_client = manager.get("mcp_client") if mcp_client is None: raise ValueError("MCP client is missing") storage_manager = manager.get("storage") if storage_manager is None: raise ValueError("Storage manager is missing") existing_task = storage.get_task(storage_manager, validated_id) normalized_task = models.jules_task_from_dict(existing_task) current_status = normalized_task.get("status") if current_status != "paused": raise ValueError("Task must be paused to resume") payload = {"taskId": validated_id} LOGGER.info("Resuming task via MCP", extra=payload) try: response = _invoke_mcp_tool(mcp_client, "jules_resume_task", payload) except Exception as error: # noqa: BLE001 LOGGER.error("MCP invocation failed", extra={"task_id": validated_id}) raise RuntimeError("Failed to resume task via MCP") from error text_payload = _extract_response_text(response) try: raw_data = json.loads(text_payload) except json.JSONDecodeError as error: raise ValueError("Unable to parse resume payload") from error if not isinstance(raw_data, dict): raise ValueError("Resume payload must be a dictionary") success_value = raw_data.get("success") if success_value is False: return False if raw_data.get("error"): message_text = str(raw_data.get("error")) raise RuntimeError(f"MCP task resume failed: {message_text}") if success_value is None: raise ValueError("Resume payload missing success indicator") if success_value is not True: raise ValueError("Unexpected success value in resume payload") normalized_task["status"] = "in_progress" normalized_task["updated_at"] = datetime.now().astimezone() serialized_task = models.jules_task_to_dict(normalized_task) storage.save_task(storage_manager, serialized_task) return True

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