Skip to main content
Glama

get_local_storage

Retrieve all data stored in browser localStorage for debugging web applications, inspecting stored values, and analyzing client-side data persistence.

Instructions

Obtém todos os dados do localStorage

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'get_local_storage' tool. It uses Puppeteer's page.evaluate to access localStorage, iterates through all keys, collects key-value pairs, and returns them as formatted JSON.
     * Handler para a ferramenta get_local_storage
     */
    export async function handleGetLocalStorage(currentPage: Page): Promise<ToolResponse> {
      const storage = await currentPage.evaluate((): Record<string, string> => {
        const items: Record<string, string> = {};
        for (let i = 0; i < localStorage.length; i++) {
          const key = localStorage.key(i);
          if (key) {
            items[key] = localStorage.getItem(key) || '';
          }
        }
        return items;
      });
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(storage, null, 2),
          },
        ],
      };
    }
  • The tool schema definition in the tools array, specifying the name, description, and empty input schema (no parameters required).
    {
      name: 'get_local_storage',
      description: 'Obtém todos os dados do localStorage',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • src/index.ts:111-114 (registration)
    The dispatch logic in the main switch statement that handles calls to 'get_local_storage' by initializing a browser page and invoking the handler.
    case 'get_local_storage': {
      const currentPage = await initBrowser();
      return await handleGetLocalStorage(currentPage);
    }
  • src/index.ts:21-21 (registration)
    Import of the handleGetLocalStorage handler function from browserTools.ts.
    handleGetLocalStorage,
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states what the tool does but doesn't describe important behaviors: whether this is a read-only operation (implied but not stated), what format the data returns (e.g., key-value pairs), if there are size limits or permissions needed, or if it only works in specific contexts like browser automation. The description is minimal and lacks behavioral context.

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?

The description is a single, efficient sentence in Portuguese that directly states the tool's function without any wasted words. It's appropriately sized for a simple tool with no parameters and gets straight to the point with 'Obtém todos os dados do localStorage'.

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

Completeness2/5

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

Given this is a data retrieval tool with no annotations, no output schema, and 0 parameters, the description is incomplete. It doesn't explain what localStorage is, what format the data returns, or any limitations. While the tool is simple, the description lacks context about the data domain and expected output format, which would help the agent understand what to expect.

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?

The tool has 0 parameters with 100% schema description coverage, so the schema already fully documents the lack of inputs. The description doesn't need to compensate for any parameter gaps. It appropriately doesn't mention parameters since none exist, earning a baseline score of 4 for not adding unnecessary information.

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 'Obtém todos os dados do localStorage' clearly states the action (obtains) and resource (all localStorage data) in Portuguese. It's specific about retrieving all data rather than filtered subsets. However, it doesn't explicitly differentiate from sibling tools like get_cookies or get_dom, which also retrieve browser storage/state data.

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 doesn't mention what localStorage is, when it's available (e.g., only in browser contexts), or how it differs from similar tools like get_cookies or get_console_logs. The agent must infer usage from the name alone.

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/EmmanuelBarbosaMonteiro/mcp-server-browser'

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