Skip to main content
Glama

jules_screenshot

Capture screenshots of Jules AI coding assistant pages for debugging and verification purposes during development workflows.

Instructions

Take a screenshot of current Jules page for debugging and verification

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filenameNoOptional filename for screenshot
taskIdNoOptional task ID to navigate to first

Implementation Reference

  • The handler function that implements the jules_screenshot tool. It optionally navigates to a task page, takes a full-page screenshot using Playwright, saves it to a file, and returns the file path.
    private async takeScreenshot(args: any) {
      const { taskId, filename } = args;
      const page = await this.getPage();
    
      try {
        if (taskId) {
          const actualTaskId = this.extractTaskId(taskId);
          const url = taskId.includes('jules.google.com') ? taskId : `${this.config.baseUrl}/task/${actualTaskId}`;
          await page.goto(url);
          await page.waitForLoadState('networkidle');
        }
    
        const screenshotPath = filename || `jules-screenshot-${Date.now()}.png`;
        await page.screenshot({ path: screenshotPath, fullPage: true });
    
        return {
          content: [
            {
              type: 'text',
              text: `Screenshot saved to: ${screenshotPath}`
            }
          ]
        };
      } catch (error) {
        throw new Error(`Failed to take screenshot: ${error}`);
      }
    }
  • The input schema definition for the jules_screenshot tool, registered in the listTools handler.
      name: 'jules_screenshot',
      description: 'Take a screenshot of current Jules page for debugging and verification',
      inputSchema: {
        type: 'object',
        properties: {
          taskId: {
            type: 'string',
            description: 'Optional task ID to navigate to first',
          },
          filename: {
            type: 'string',
            description: 'Optional filename for screenshot',
          },
        },
      },
    },
  • src/index.ts:382-382 (registration)
    The dispatch case in the CallToolRequestSchema handler that routes calls to the takeScreenshot method.
    return await this.takeScreenshot(args);
  • Helper method used by takeScreenshot to extract task ID from URL if provided.
    private extractTaskId(taskIdOrUrl: string): string {
      if (taskIdOrUrl.includes('jules.google.com/task/')) {
        const match = taskIdOrUrl.match(/\/task\/([^/]+)/);
        return match ? match[1] : taskIdOrUrl;
      }
      return taskIdOrUrl;
    }
  • src/index.ts:118-358 (registration)
    The ListToolsRequestSchema handler that registers and advertises the jules_screenshot tool schema.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: [
          // === CORE TASK MANAGEMENT ===
          {
            name: 'jules_create_task',
            description: 'Create a new task in Google Jules with repository and description',
            inputSchema: {
              type: 'object',
              properties: {
                description: {
                  type: 'string',
                  description: 'Task description - what you want Jules to do',
                },
                repository: {
                  type: 'string',
                  description: 'GitHub repository in format owner/repo-name',
                },
                branch: {
                  type: 'string',
                  description: 'Git branch to work on (optional, defaults to main)',
                },
              },
              required: ['description', 'repository'],
            },
          },
          {
            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'],
            },
          },
          {
            name: 'jules_list_tasks',
            description: 'List all Jules tasks with their status',
            inputSchema: {
              type: 'object',
              properties: {
                status: {
                  type: 'string',
                  enum: ['all', 'active', 'pending', 'completed', 'paused'],
                  description: 'Filter tasks by status',
                },
                limit: {
                  type: 'number',
                  description: 'Maximum number of tasks to return (default 10)',
                },
              },
            },
          },
          {
            name: 'jules_send_message',
            description: 'Send a message/instruction to Jules in an active task',
            inputSchema: {
              type: 'object',
              properties: {
                taskId: {
                  type: 'string',
                  description: 'Task ID or URL',
                },
                message: {
                  type: 'string',
                  description: 'Message to send to Jules',
                },
              },
              required: ['taskId', 'message'],
            },
          },
          {
            name: 'jules_approve_plan',
            description: 'Approve Jules execution plan for a task',
            inputSchema: {
              type: 'object',
              properties: {
                taskId: {
                  type: 'string',
                  description: 'Task ID or URL',
                },
              },
              required: ['taskId'],
            },
          },
          {
            name: 'jules_resume_task',
            description: 'Resume a paused Jules task',
            inputSchema: {
              type: 'object',
              properties: {
                taskId: {
                  type: 'string',
                  description: 'Task ID or URL',
                },
              },
              required: ['taskId'],
            },
          },
          // === ADVANCED TASK OPERATIONS ===
          {
            name: 'jules_analyze_code',
            description: 'Analyze code changes and diff in a Jules task',
            inputSchema: {
              type: 'object',
              properties: {
                taskId: {
                  type: 'string',
                  description: 'Task ID or URL',
                },
                includeSourceCode: {
                  type: 'boolean',
                  description: 'Whether to include full source code content',
                },
              },
              required: ['taskId'],
            },
          },
          {
            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'],
            },
          },
          // === SESSION & AUTHENTICATION MANAGEMENT ===
          {
            name: 'jules_session_info',
            description: 'Get current session configuration and authentication status',
            inputSchema: {
              type: 'object',
              properties: {},
            },
          },
          {
            name: 'jules_setup_wizard',
            description: 'Interactive session setup wizard for automated Google authentication configuration',
            inputSchema: {
              type: 'object',
              properties: {
                environment: {
                  type: 'string',
                  enum: ['local', 'cloud', 'smithery', 'auto-detect'],
                  description: 'Deployment environment (auto-detect will analyze current setup)',
                },
                preferences: {
                  type: 'object',
                  properties: {
                    priority: {
                      type: 'string',
                      enum: ['ease-of-use', 'reliability', 'portability', 'performance'],
                      description: 'User priority for session management'
                    },
                    hasChrome: {
                      type: 'boolean',
                      description: 'Whether user has local Chrome browser access'
                    },
                    cloudDeployment: {
                      type: 'boolean', 
                      description: 'Whether deploying to cloud platforms'
                    }
                  }
                }
              },
            },
          },
          {
            name: 'jules_get_cookies',
            description: 'Extract current browser cookies for session persistence and backup',
            inputSchema: {
              type: 'object',
              properties: {
                format: {
                  type: 'string',
                  enum: ['json', 'string'],
                  description: 'Output format for cookies (default: json)',
                },
              },
            },
          },
          {
            name: 'jules_set_cookies',
            description: 'Set browser cookies from string or JSON for authentication',
            inputSchema: {
              type: 'object',
              properties: {
                cookies: {
                  type: 'string',
                  description: 'Cookies as JSON string or cookie string format',
                },
                format: {
                  type: 'string',
                  enum: ['json', 'string'],
                  description: 'Format of input cookies (default: json)',
                },
              },
              required: ['cookies'],
            },
          },
          // === DEBUGGING & UTILITIES ===
          {
            name: 'jules_screenshot',
            description: 'Take a screenshot of current Jules page for debugging and verification',
            inputSchema: {
              type: 'object',
              properties: {
                taskId: {
                  type: 'string',
                  description: 'Optional task ID to navigate to first',
                },
                filename: {
                  type: 'string',
                  description: 'Optional filename for screenshot',
                },
              },
            },
          },
        ],
      };
    });
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions the tool captures a screenshot but lacks behavioral details: it doesn't specify if this requires permissions, affects page state, has rate limits, or what the output looks like (e.g., file format, storage location). For a tool with potential side effects (navigation via taskId), this is inadequate transparency.

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, efficient sentence that front-loads the core action ('Take a screenshot') and purpose. Every word earns its place with no redundancy or fluff, making it highly concise and well-structured for quick understanding.

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?

Given no annotations, no output schema, and a tool that involves potential navigation (via taskId) and file creation, the description is incomplete. It doesn't cover behavioral aspects like side effects, output format, or error handling. For a tool with 2 parameters and debugging use, more context is needed to ensure safe and effective use.

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?

Schema description coverage is 100%, so the schema already documents both parameters (filename and taskId) as optional strings. The description adds no additional meaning beyond the schema—it doesn't explain parameter interactions (e.g., if taskId affects the screenshot) or usage nuances. Baseline 3 is appropriate when schema does the heavy lifting.

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?

The description clearly states the action ('Take a screenshot') and target ('current Jules page'), with a specific purpose ('for debugging and verification'). It distinguishes from siblings like jules_analyze_code or jules_create_task by focusing on visual capture rather than code analysis or task management. However, it doesn't explicitly differentiate from potential similar tools (none exist in the sibling list), keeping it at 4 rather than 5.

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?

The description provides minimal guidance: it implies use for debugging/verification but offers no explicit when-to-use rules, prerequisites, or alternatives. For example, it doesn't specify if this should be used instead of other debugging tools or under what conditions (e.g., after errors). With no context on exclusions or comparisons, this is a basic level of guidance.

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

Install Server

Other Tools

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