Skip to main content
Glama

browser_snapshot

Capture structured accessibility snapshots of web pages for analysis and testing, providing detailed page information without screenshots.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filenameNoSave snapshot to markdown file instead of returning it in the response.

Implementation Reference

  • Core handler implementation for the 'browser_snapshot' tool. Ensures an active tab and sets the response to include an accessibility snapshot of the current page.
    handle: async (context, params, response) => { await context.ensureTab(); response.setIncludeSnapshot(); },
  • Schema definition for the 'browser_snapshot' tool, which takes no input parameters and is marked as readOnly.
    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', },
  • src/tools.ts:36-52 (registration)
    Registration of all tools including the snapshot module (containing browser_snapshot) in the allTools array used by the BrowserServerBackend.
    export const allTools: Tool<any>[] = [ ...common, ...console, ...dialogs, ...evaluate, ...files, ...install, ...keyboard, ...navigate, ...network, ...mouse, ...pdf, ...screenshot, ...snapshot, ...tabs, ...wait, ];
  • The ServerBackend.tools() method that exposes the schemas of all registered tools, including browser_snapshot, to the MCP server for listTools requests.
    tools(): mcpServer.ToolSchema<any>[] { return this._tools.map(tool => tool.schema); }
  • LoopTools-specific handler for 'browser_snapshot' that delegates to context.runTask to capture the snapshot.
    handle: async (context, params) => { return await context.runTask('Capture browser snapshot', true); },

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/nzjami/mcpPlaywright'

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