Skip to main content
Glama

jules_get_cookies

Extract current browser cookies to maintain session persistence and create backups for Google Jules AI coding assistant workflows.

Instructions

Extract current browser cookies for session persistence and backup

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNoOutput format for cookies (default: json)

Implementation Reference

  • The main handler function that extracts cookies from the browser context using Playwright's page.context().cookies() and returns them in JSON or string format.
    private async getCookies(args: any) { const { format = 'json' } = args; const page = await this.getPage(); try { const cookies = await page.context().cookies(); if (format === 'string') { const cookieString = cookies.map(cookie => `${cookie.name}=${cookie.value}; domain=${cookie.domain}; path=${cookie.path}` ).join('; '); return { content: [ { type: 'text', text: `Cookie String:\\n${cookieString}` } ] }; } else { return { content: [ { type: 'text', text: `Cookies (${cookies.length} total):\\n${JSON.stringify(cookies, null, 2)}` } ] }; } } catch (error) { throw new Error(`Failed to get cookies: ${error}`); } }
  • The tool schema definition including name, description, and input schema registered in the ListToolsRequestSchema handler.
    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)', }, }, }, },
  • src/index.ts:384-384 (registration)
    Registration of the tool handler in the CallToolRequestSchema switch statement, dispatching calls to the getCookies method.
    return await this.getCookies(args);

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