Skip to main content
Glama
BrowserGenie

BrowserGenie MCP Server

by BrowserGenie

get_session_storage

Read sessionStorage entries from the current page by specifying a key or retrieving all values. Supports targeting a specific tab.

Instructions

Read sessionStorage entries for the current page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyNoSpecific key to read (returns all if omitted)
tabIdNoTarget tab ID (defaults to active tab)
apiKeyNoAPI key for authentication

Implementation Reference

  • The handler for the 'get_session_storage' tool. It reads sessionStorage entries for the current page by sending a 'get_session_storage' command via the WebSocket bridge. Accepts optional 'key' (returns all if omitted), 'tabId' (defaults to active tab), and 'apiKey' params.
    server.tool(
      'get_session_storage',
      'Read sessionStorage entries for the current page',
      {
        key: z.string().optional().describe('Specific key to read (returns all if omitted)'),
        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: 'get_session_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: JSON.stringify(result.data, null, 2) }] };
      }
    );
  • Input schema for the 'get_session_storage' tool using Zod. Defines optional 'key' (string), 'tabId' (number), and 'apiKey' (string) parameters with descriptions.
    {
      key: z.string().optional().describe('Specific key to read (returns all if omitted)'),
      tabId: z.number().optional().describe('Target tab ID (defaults to active tab)'),
      apiKey: z.string().optional().describe('API key for authentication'),
  • Registration call: registerDevtoolsStorageTools(server, bridge) which registers all devtools storage tools including 'get_session_storage'.
    registerDevtoolsStorageTools(server, bridge);
  • The export function registerDevtoolsStorageTools that registers all storage-related tools (cookies, localStorage, sessionStorage) on the MCP server.
    export function registerDevtoolsStorageTools(server: McpServer, bridge: WebSocketBridge) {
Behavior3/5

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

Description implies read-only, non-destructive operation, but does not disclose authentication requirements or side effects. With no annotations, description carries the burden but is minimal.

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?

Single sentence, no unnecessary words, front-loaded with verb and resource.

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?

No output schema, and description does not explain return format (e.g., object with keys/values). For a read tool, return value documentation is important.

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 schema already documents parameters. Description adds no extra meaning beyond the schema descriptions.

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?

Description clearly states verb 'Read', resource 'sessionStorage entries', and scope 'for the current page'. Distinguishes from sibling tools like set_session_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?

No guidance on when to use this tool versus alternatives like get_local_storage or set_session_storage. No context on prerequisites or exclusions.

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