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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations provided, so description carries full burden. Merely says 'Get details', implying a read operation, but gives no information about side effects, required permissions, or what happens if the task doesn't exist.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Extremely concise at 9 words, front-loaded with action and resource. Could be slightly more informative without losing conciseness, but no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Minimum viable for a simple retrieval tool. Lacks return value description, error scenarios, or mention of output schema, but the tool complexity is low with one parameter.

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?

Input schema has 100% coverage, describing taskId as 'Task ID or full Jules task URL'. Description repeats this info without adding extra meaning, meeting baseline but not exceeding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states 'Get details of a specific Jules task', which is a specific verb and resource. It implies differentiation from list tasks by focusing on a single task, but does not explicitly distinguish from siblings like jules_analyze_code.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool vs alternatives. Does not mention that you need a task ID or URL from jules_list_tasks first, or that it's read-only.

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