Skip to main content
Glama

pilot_dialog

Retrieve browser dialog messages (alerts, confirms, prompts) from automated sessions to handle user interactions and decision points during web automation.

Instructions

Get captured dialog (alert/confirm/prompt) messages.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clearNoClear the buffer after reading

Implementation Reference

  • The tool 'pilot_dialog' is implemented as an anonymous async function within 'server.tool', handling browser dialog retrieval and clearing via the 'dialogBuffer'.
    server.tool(
      'pilot_dialog',
      'Get captured dialog (alert/confirm/prompt) messages.',
      { clear: z.boolean().optional().describe('Clear the buffer after reading') },
      async ({ clear }) => {
        await bm.ensureBrowser();
        if (clear) { dialogBuffer.clear(); return { content: [{ type: 'text' as const, text: 'Dialog buffer cleared.' }] }; }
        if (dialogBuffer.length === 0) return { content: [{ type: 'text' as const, text: '(no dialogs captured)' }] };
        const text = dialogBuffer.toArray().map(e =>
          `[${new Date(e.timestamp).toISOString()}] [${e.type}] "${e.message}" → ${e.action}${e.response ? ` "${e.response}"` : ''}`
        ).join('\n');
        return { content: [{ type: 'text' as const, text }] };
      }
    );

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