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 };
        }
      }
    );
Behavior3/5

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

No annotations provided, so description carries full disclosure burden. It indicates the read-only nature via 'Get' and discloses JSON output format. However, it omits scope details (current page vs all domains), privacy/sensitivity implications of cookie access, and whether 'all' includes httpOnly/secure cookies.

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?

Extremely concise at 5 words with zero redundancy. Every element earns its place: operation (Get), scope (all), resource (cookies), format (as JSON). Appropriate length for a zero-parameter retrieval tool.

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?

Adequate for basic invocation but incomplete given the security-sensitive nature of cookies and lack of output schema. Missing critical context: whether it returns only current domain cookies or all browser cookies, and the structure of returned JSON objects.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Zero parameters present, which per scoring rules establishes a baseline of 4. The description appropriately reflects this simplicity by not inventing parameters.

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 uses specific verb 'Get' and resource 'cookies', and specifies output format 'as JSON'. It implicitly distinguishes from sibling 'pilot_set_cookie' through the retrieval verb, though it lacks explicit browser/page scope context that would make it a 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?

No explicit guidance on when to use this versus siblings like pilot_set_cookie or pilot_import_cookies, nor any prerequisites or permission warnings. The agent must infer usage solely from the verb choice.

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/TacosyHorchata/Pilot'

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