Skip to main content
Glama

pilot_page_diff

Compare webpage content between two URLs to identify differences in staging versus production environments or other page versions.

Instructions

Text diff between two URLs — compare staging vs production, etc.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
url1YesFirst URL
url2YesSecond URL

Implementation Reference

  • Implementation of the pilot_page_diff MCP tool, which compares the textual content of two URLs using diff-lines.
    server.tool(
      'pilot_page_diff',
      'Text diff between two URLs — compare staging vs production, etc.',
      {
        url1: z.string().describe('First URL'),
        url2: z.string().describe('Second URL'),
      },
      async ({ url1, url2 }) => {
        await bm.ensureBrowser();
        try {
          const page = bm.getPage();
          await validateNavigationUrl(url1);
          await page.goto(url1, { waitUntil: 'domcontentloaded', timeout: 15000 });
          const text1 = await getCleanText(page);
    
          await validateNavigationUrl(url2);
          await page.goto(url2, { waitUntil: 'domcontentloaded', timeout: 15000 });
          const text2 = await getCleanText(page);
    
          const changes = Diff.diffLines(text1, text2);
          const output: string[] = [`--- ${url1}`, `+++ ${url2}`, ''];
    
          for (const part of changes) {
            const prefix = part.added ? '+' : part.removed ? '-' : ' ';
            const lines = part.value.split('\n').filter(l => l.length > 0);
            for (const line of lines) {
              output.push(`${prefix} ${line}`);
            }
          }
    
          return { content: [{ type: 'text' as const, text: output.join('\n') }] };
        } catch (err) {
          return { content: [{ type: 'text' as const, text: wrapError(err) }], isError: true };
        }
      }
    );
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but fails to specify what content is extracted (visible text vs HTML), how dynamic content is handled, whether pages are fetched fresh or use existing session state, or what format the diff output takes. Only basic operation type is disclosed.

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 extremely concise at one sentence with an appositive clause. Every word earns its place: the em-dash efficiently introduces the use case example without verbosity. Appropriately front-loaded with the core action.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema and no annotations, the description omits critical information needed for tool selection: the return value format (unified diff? HTML? structured JSON?), error handling for unreachable URLs, and whether authentication state is shared between fetches. For a 2-parameter tool with no structured metadata, the description should compensate more.

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

Parameters3/5

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

With 100% schema description coverage ('First URL', 'Second URL'), the schema already documents the parameters adequately. The description mentions URLs in context but adds no additional semantic value regarding order significance, URL format requirements, or validation rules, meeting the baseline for high-coverage schemas.

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 provides a clear verb ('diff') and resource ('two URLs'), and distinguishes from visual-focused siblings like pilot_screenshot or pilot_snapshot_diff by specifying 'Text diff'. The 'staging vs production' example adds concrete context.

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 a use case (comparing staging vs production environments) but lacks explicit guidance on when to use this versus visual alternatives like pilot_snapshot_diff or text extraction tools like pilot_page_text. No contraindications or prerequisites are mentioned.

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

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