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 }] };
      }
    );
Behavior2/5

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

No annotations provided, so description carries full burden. States 'captured' implying a buffer mechanism, but fails to disclose: whether retrieval is destructive, what happens if buffer is empty, blocking behavior, or return format. The 'clear' parameter suggests side effects not explained in the description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single 6-word sentence is ruthlessly efficient and front-loaded with action verb. However, extreme brevity comes at cost of missing behavioral details. No wasted words, but slightly too terse for the complexity of dialog handling.

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?

With no output schema, description omits critical return value information (array? object? text only?). For a tool managing browser dialog state, the buffer lifecycle and relationship to 'pilot_handle_dialog' should be covered. Adequate but incomplete.

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?

Schema coverage is 100% with 'clear' parameter fully documented ('Clear the buffer after reading'). Description adds no syntax or usage details beyond schema, so baseline 3 applies. The word 'captured' in description loosely contextualizes the buffer concept implied by the parameter.

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?

States specific verb 'Get' and target resource 'captured dialog messages' with examples (alert/confirm/prompt). However, it fails to distinguish from sibling 'pilot_handle_dialog' which likely manages dialog interaction rather than retrieval.

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

Usage Guidelines2/5

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

No guidance on when to use versus 'pilot_handle_dialog' or other dialog tools. Missing workflow context (e.g., 'call this after dialogs appear' or 'poll until dialogs captured'). No mention of prerequisites or sequencing with page interactions.

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