Skip to main content
Glama
BrowserGenie

BrowserGenie MCP Server

by BrowserGenie

test_storage_sync

Validates localStorage synchronization across browser tabs by setting a value in tab A and verifying its presence in tab B.

Instructions

Test cross-tab localStorage synchronization. Sets a value in tab A and checks if it appears in tab B.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tabIdAYesTab ID to set localStorage value in
tabIdBYesTab ID to verify localStorage value in
keyYeslocalStorage key to test
valueYesValue to set and expect
apiKeyNoAPI key for authentication if enabled

Implementation Reference

  • The tool handler for 'test_storage_sync'. It accepts tabIdA, tabIdB, key, value (and optional apiKey), sends a 'test_storage_sync' command via WebSocket bridge, and returns the result. This is the function that executes the tool logic.
    server.tool(
      'test_storage_sync',
      'Test cross-tab localStorage synchronization. Sets a value in tab A and checks if it appears in tab B.',
      {
        tabIdA: z.number().describe('Tab ID to set localStorage value in'),
        tabIdB: z.number().describe('Tab ID to verify localStorage value in'),
        key: z.string().describe('localStorage key to test'),
        value: z.string().describe('Value to set and expect'),
        apiKey: z.string().optional().describe('API key for authentication if enabled'),
      },
      async ({ tabIdA, tabIdB, key, value, apiKey }) => {
        const result = await bridge.sendCommand({
          command: 'test_storage_sync',
          params: { tabIdA, tabIdB, key, value },
          apiKey,
        });
        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) }] };
      }
    );
  • Input parameter schema for 'test_storage_sync' tool using Zod validation. Defines tabIdA (number), tabIdB (number), key (string), value (string), and optional apiKey (string).
    {
      tabIdA: z.number().describe('Tab ID to set localStorage value in'),
      tabIdB: z.number().describe('Tab ID to verify localStorage value in'),
      key: z.string().describe('localStorage key to test'),
      value: z.string().describe('Value to set and expect'),
      apiKey: z.string().optional().describe('API key for authentication if enabled'),
    },
  • The tool is registered via server.tool() call inside registerTabManagementTools(). The function registerTabManagementTools is called from src/tools/index.ts (line 31) which is called from src/server.ts (line 11) which is called from src/index.ts (line 8).
      server.tool(
        'test_storage_sync',
        'Test cross-tab localStorage synchronization. Sets a value in tab A and checks if it appears in tab B.',
        {
          tabIdA: z.number().describe('Tab ID to set localStorage value in'),
          tabIdB: z.number().describe('Tab ID to verify localStorage value in'),
          key: z.string().describe('localStorage key to test'),
          value: z.string().describe('Value to set and expect'),
          apiKey: z.string().optional().describe('API key for authentication if enabled'),
        },
        async ({ tabIdA, tabIdB, key, value, apiKey }) => {
          const result = await bridge.sendCommand({
            command: 'test_storage_sync',
            params: { tabIdA, tabIdB, key, value },
            apiKey,
          });
          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) }] };
        }
      );
    }
  • The registerAllTools function calls registerTabManagementTools(server, bridge), which registers 'test_storage_sync' among other tab management tools.
    export function registerAllTools(server: McpServer, bridge: WebSocketBridge) {
      registerNavigationTools(server, bridge);
      registerTabManagementTools(server, bridge);
Behavior3/5

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

The description discloses the two-step operation (set then check), but lacks details on side effects, error handling, or prerequisites. Without annotations, more behavioral context would be beneficial.

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 with no fluff, front-loading the core purpose. Every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

While no output schema exists, the description adequately covers the core use case. It could mention success/failure behavior, but given tool simplicity, it is sufficiently complete.

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 coverage is 100%, so baseline is 3. The description adds no extra meaning beyond the schema parameter descriptions, only indirectly maps tabIdA/tabIdB to tab A/B.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific verb 'Test' and resource 'cross-tab localStorage synchronization', and distinguishes from siblings like set_local_storage and get_local_storage by specifying cross-tab verification.

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

Usage Guidelines4/5

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

The description implies a test scenario for cross-tab sync, which provides context, but does not explicitly state when to use or avoid this tool compared to alternatives.

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