Skip to main content
Glama

pilot_cookies

Retrieve browser cookies in JSON format from a persistent Chromium instance to enable AI agents to manage web sessions and handle authentication during automated browsing tasks.

Instructions

Get all cookies as JSON.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The implementation and registration of the 'pilot_cookies' tool, which fetches cookies from the browser context using Playwright.
    server.tool(
      'pilot_cookies',
      'Get all cookies as JSON.',
      {},
      async () => {
        await bm.ensureBrowser();
        try {
          const cookies = await bm.getPage().context().cookies();
          return { content: [{ type: 'text' as const, text: JSON.stringify(cookies, null, 2) }] };
        } catch (err) {
          return { content: [{ type: 'text' as const, text: wrapError(err) }], isError: 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/TacosyHorchata/Pilot'

If you have feedback or need assistance with the MCP directory API, please join our Discord server