Skip to main content
Glama

browser_snapshot

Capture detailed accessibility snapshots of web pages to support WCAG compliance checks, offering insights beyond standard screenshots for improved remediation.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core implementation of the browser_snapshot tool. The handler function ensures the current tab exists and sets the response to include a snapshot of the page DOM, enabling actions on elements.
    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(); }, });
  • Schema definition for the browser_snapshot tool, specifying empty input schema as it takes no parameters.
    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:38-56 (registration)
    The browser_snapshot tool from snapshot.ts is included in the central allTools registry via spread operator.
    export const allTools: Tool<any>[] = [ ...common, ...console, ...dialogs, ...evaluate, ...files, ...form, ...install, ...keyboard, ...navigate, ...network, ...mouse, ...pdf, ...screenshot, ...snapshot, ...tabs, ...wait, ...verify, ];
  • The snapshot tool (browser_snapshot) is exported as part of the module's default tools array.
    export default [ snapshot, click, drag, hover, selectOption, scanPage
  • Helper error message recommending use of browser_snapshot when element refs are invalid.
    throw new Error('Ref not found, likely because element was removed. Use browser_snapshot to see what elements are currently on the page.'); }

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/JustasMonkev/mcp-accessibility-scanner'

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