Skip to main content
Glama
BrowserGenie

BrowserGenie MCP Server

by BrowserGenie

remove_local_storage

Removes a specific localStorage entry from the current page, clearing stored data associated with that key.

Instructions

Remove a localStorage entry from the current page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesStorage key to remove
tabIdNoTarget tab ID (defaults to active tab)
apiKeyNoAPI key for authentication

Implementation Reference

  • The handler function for the 'remove_local_storage' tool. It calls bridge.sendCommand with command 'remove_local_storage', passing the key parameter, and returns a success message or error.
    server.tool(
      'remove_local_storage',
      'Remove a localStorage entry from the current page',
      {
        key: z.string().describe('Storage key to remove'),
        tabId: z.number().optional().describe('Target tab ID (defaults to active tab)'),
        apiKey: z.string().optional().describe('API key for authentication'),
      },
      async ({ key, tabId, apiKey }) => {
        const result = await bridge.sendCommand({ command: 'remove_local_storage', params: { key }, tabId, apiKey });
        if (!result.success) return { content: [{ type: 'text' as const, text: `Error: ${result.error?.message}` }], isError: true };
        return { content: [{ type: 'text' as const, text: `localStorage["${key}"] removed` }] };
      }
  • Input schema for 'remove_local_storage': requires 'key' (string), optional 'tabId' (number), and optional 'apiKey' (string).
    {
      key: z.string().describe('Storage key to remove'),
      tabId: z.number().optional().describe('Target tab ID (defaults to active tab)'),
      apiKey: z.string().optional().describe('API key for authentication'),
    },
  • Registration of the 'remove_local_storage' tool via server.tool() with description 'Remove a localStorage entry from the current page'.
    server.tool(
      'remove_local_storage',
      'Remove a localStorage entry from the current page',
      {
        key: z.string().describe('Storage key to remove'),
        tabId: z.number().optional().describe('Target tab ID (defaults to active tab)'),
        apiKey: z.string().optional().describe('API key for authentication'),
      },
      async ({ key, tabId, apiKey }) => {
        const result = await bridge.sendCommand({ command: 'remove_local_storage', params: { key }, tabId, apiKey });
        if (!result.success) return { content: [{ type: 'text' as const, text: `Error: ${result.error?.message}` }], isError: true };
        return { content: [{ type: 'text' as const, text: `localStorage["${key}"] removed` }] };
      }
    );
  • The function registerDevtoolsStorageTools is called from registerAllTools, which wires up the tool into the MCP server.
    registerDevtoolsStorageTools(server, bridge);
Behavior2/5

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

No annotations are provided, so the description alone must disclose behavioral traits. It only states the basic action without mentioning side effects, permissions required, or behavior when the key does not exist, leaving significant gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no fluff. It is efficient, though it could benefit from additional context without sacrificing conciseness.

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?

For a simple tool with full schema coverage and no output schema, the description is minimally adequate. However, it lacks behavioral details (e.g., permanence, error handling) that would make it complete given the absence of annotations.

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?

The input schema covers all parameters with descriptions (100% coverage). The description adds no additional meaning beyond the schema, warranting the baseline score of 3.

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 tool removes a localStorage entry from the current page. The verb 'remove' and resource 'localStorage entry' are specific, and it is easily distinguishable from sibling tools like 'set_local_storage' and 'remove_session_storage'.

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?

The description provides no guidance on when to use this tool versus alternatives. It does not mention when not to use it, nor any prerequisites or context for when removal is appropriate, relying solely on the tool name for differentiation.

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