Skip to main content
Glama

browser_snapshot

Capture accessibility snapshots of web pages to analyze content structure without screenshots, enabling automated web interaction through structured data.

Instructions

Capture accessibility snapshot of the current page, this is better than screenshot

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Primary implementation of the browser_snapshot tool, including schema and handler. The handler ensures a tab is active and flags the response to include an accessibility snapshot of the page.
    const snapshot = defineTool({ capability: 'core', schema: { name: 'browser_snapshot', title: 'Page snapshot', description: 'Capture accessibility snapshot of the current page, this is better than screenshot', inputSchema: z.object({}), type: 'readOnly', }, handle: async (context, params, response) => { await context.ensureTab(); response.setIncludeSnapshot(); }, });
  • src/tools.ts:36-52 (registration)
    Registers the browser_snapshot tool (via ...snapshot) along with other tools in the allTools array, which is used to expose tools to the MCP server.
    export const allTools: Tool<any>[] = [ ...common, ...console, ...dialogs, ...evaluate, ...files, ...install, ...keyboard, ...navigate, ...network, ...mouse, ...pdf, ...screenshot, ...snapshot, ...tabs, ...wait, ];
  • Secondary handler for browser_snapshot in loopTools context, which delegates to context.runTask to capture snapshot via LLM loop.
    export const snapshot = defineTool({ schema: { name: 'browser_snapshot', title: 'Take a snapshot of the browser', description: 'Take a snapshot of the browser to read what is on the page.', inputSchema: z.object({}), type: 'readOnly', }, handle: async (context, params) => { return await context.runTask('Capture browser snapshot', true); }, });
  • Registers the browser_snapshot tool (snapshot) in the LoopToolsServerBackend tools list for the loop tools MCP server.
    private _tools: Tool<any>[] = [perform, snapshot];

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/maywzh/playwright-mcp'

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