Skip to main content
Glama

browser_snapshot

Read-only

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];
Behavior3/5

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

Annotations already provide readOnlyHint=true, destructiveHint=false, and openWorldHint=true, indicating a safe, non-destructive operation with open-world semantics. The description adds context by specifying it captures an 'accessibility snapshot' and compares it to a screenshot, but doesn't detail what an accessibility snapshot entails (e.g., format, content) or any behavioral traits like rate limits or performance impact.

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?

The description is a single, efficient sentence that directly states the tool's purpose and key differentiator ('better than screenshot'). It is front-loaded with the core action and wastes no words, making it highly concise and well-structured.

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?

Given the tool has no parameters, rich annotations (readOnlyHint, destructiveHint, openWorldHint), and no output schema, the description is adequate but incomplete. It explains what the tool does and hints at its advantage over a sibling, but lacks details on what an 'accessibility snapshot' returns (e.g., structured data vs. image) or any operational constraints, which could be important for an AI agent to use it effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0 parameters and 100% schema description coverage, the schema fully documents the lack of inputs. The description doesn't need to add parameter information, so a baseline of 4 is appropriate as it doesn't introduce confusion or redundancy regarding parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('capture') and resource ('accessibility snapshot of the current page'), making the purpose specific and understandable. It distinguishes from the sibling 'browser_take_screenshot' by mentioning it's 'better than screenshot', though it doesn't explicitly name that sibling tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by contrasting with 'screenshot' (likely referring to 'browser_take_screenshot'), suggesting this tool is preferred for accessibility purposes. However, it lacks explicit guidance on when to use this tool versus alternatives or any prerequisites, leaving usage context somewhat vague.

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

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