Skip to main content
Glama
BrowserGenie

BrowserGenie MCP Server

by BrowserGenie

monitor_cookie_changes

Start, stop, or retrieve recorded cookie changes across browser tabs. Optionally filter by domain to track specific site cookies.

Instructions

Monitor cookie changes across all tabs. Start monitoring, get recorded changes, or stop. Optionally filter by domain.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesStart, stop, or get recorded changes
domainNoFilter by domain
apiKeyNoAPI key for authentication if enabled

Implementation Reference

  • Tool registration on the MCP server using server.tool() — defines name, description, schema, and handler.
    server.tool(
      'monitor_cookie_changes',
      'Monitor cookie changes across all tabs. Start monitoring, get recorded changes, or stop. Optionally filter by domain.',
      {
        action: z.enum(['start', 'stop', 'get']).describe('Start, stop, or get recorded changes'),
        domain: z.string().optional().describe('Filter by domain'),
        apiKey: z.string().optional().describe('API key for authentication if enabled'),
      },
      async ({ action, domain, apiKey }) => {
        const result = await bridge.sendCommand({
          command: 'monitor_cookie_changes',
          params: { action, domain },
          apiKey,
          timeout: LONG_TIMEOUT,
        });
        if (!result.success) {
          return { content: [{ type: 'text', text: `Error: ${result.error?.message}` }], isError: true };
        }
        return { content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }] };
      }
    );
  • Zod schema defining the tool's input parameters: action (start/stop/get), optional domain filter, and optional apiKey.
    {
      action: z.enum(['start', 'stop', 'get']).describe('Start, stop, or get recorded changes'),
      domain: z.string().optional().describe('Filter by domain'),
      apiKey: z.string().optional().describe('API key for authentication if enabled'),
    },
  • Handler function that sends the 'monitor_cookie_changes' command via WebSocketBridge to the browser extension.
    async ({ action, domain, apiKey }) => {
      const result = await bridge.sendCommand({
        command: 'monitor_cookie_changes',
        params: { action, domain },
        apiKey,
        timeout: LONG_TIMEOUT,
      });
      if (!result.success) {
        return { content: [{ type: 'text', text: `Error: ${result.error?.message}` }], isError: true };
      }
      return { content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }] };
    }
Behavior3/5

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

The description discloses monitoring across tabs and three modes, but it does not mention statefulness, retention of changes, or effects of multiple starts. No annotations provided. No contradiction.

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?

Two concise sentences front-load the purpose and actions, with no wasted words. Each sentence serves a clear function.

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?

With 3 parameters fully documented in schema and no output schema, the description covers core functionality but lacks details on monitoring state, data retention, and error scenarios. Adequate but not rich.

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?

Schema coverage is 100% with descriptions for each parameter. The description adds context by explaining the action enum values and noting domain as optional, which helps clarify usage beyond the schema.

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 it monitors cookie changes across all tabs with three actions, distinguishing it from snapshot tools like get_cookies, but does not explicitly differentiate from siblings like set_cookie.

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

Usage Guidelines3/5

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

The description explains the lifecycle (start, stop, get) and optional domain filter, providing some usage context. However, it does not specify when to use this tool versus alternatives like get_cookies or set_cookie for cookie operations.

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/BrowserGenie/mcp'

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