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

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "properties": {}, "type": "object" }

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,

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