Skip to main content
Glama

pilot_snapshot_diff

Compare current page state against previous snapshots to identify changes. First call establishes baseline, subsequent calls generate unified diffs showing modifications.

Instructions

Compare current page state against the last snapshot. Returns unified diff showing what changed. First call stores baseline.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorNoCSS selector to scope the snapshot
interactive_onlyNoOnly show interactive elements

Implementation Reference

  • The handler implementation for the 'pilot_snapshot_diff' tool, which uses 'diffSnapshot' to compare the current browser state to a baseline.
    async ({ selector, interactive_only }) => {
      await bm.ensureBrowser();
      try {
        const result = await diffSnapshot(bm, {
          selector,
          interactive: interactive_only,
        });
        bm.resetFailures();
        return { content: [{ type: 'text' as const, text: result }] };
      } catch (err) {
        bm.incrementFailures();
        return { content: [{ type: 'text' as const, text: wrapError(err) }], isError: true };
      }
    }
  • Tool registration for 'pilot_snapshot_diff' in src/tools/snapshot-tools.ts.
    server.tool(
      'pilot_snapshot_diff',
      'Compare current page state against the last snapshot. Returns unified diff showing what changed. First call stores baseline.',
      {
        selector: z.string().optional().describe('CSS selector to scope the snapshot'),
        interactive_only: z.boolean().optional().describe('Only show interactive elements'),
      },

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/TacosyHorchata/Pilot'

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