Skip to main content
Glama

pilot_console

Retrieve console messages from browser automation sessions to monitor errors, warnings, and information logs for debugging and analysis.

Instructions

Get console messages from the circular buffer.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
levelNoFilter by log level
clearNoClear the buffer after reading

Implementation Reference

  • The handler logic for the pilot_console tool, which reads console messages from a buffer and filters by level.
    async ({ level, clear }) => {
      await bm.ensureBrowser();
      let entries = consoleBuffer.toArray();
      if (level && level !== 'all') {
        if (level === 'error') {
          entries = entries.filter(e => e.level === 'error' || e.level === 'warning');
        } else {
          entries = entries.filter(e => e.level === level);
        }
      }
      if (clear) consoleBuffer.clear();
      if (entries.length === 0) return { content: [{ type: 'text' as const, text: '(no console messages)' }] };
      const text = entries.map(e =>
        `[${new Date(e.timestamp).toISOString()}] [${e.level}] ${e.text}`
      ).join('\n');
      return { content: [{ type: 'text' as const, text }] };
    }
  • Registration of the pilot_console tool including its schema definition.
    server.tool(
      'pilot_console',
      'Get console messages from the circular buffer.',
      {
        level: z.enum(['error', 'warning', 'info', 'all']).optional().describe('Filter by log level'),
        clear: z.boolean().optional().describe('Clear the buffer after reading'),
      },
Behavior2/5

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

With no annotations provided, the description fails to disclose that the 'clear' parameter causes destructive side effects (deleting buffer contents) or describe the return format/structure of the console messages.

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 sentence is efficient and front-loaded with action verb. However, extreme brevity contributes to informational gaps (behavioral traits, return values) that warranted additional content.

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?

Adequate for a simple 2-parameter tool with complete schema coverage, but gaps remain regarding output format and side effects of the 'clear' parameter, which are not addressed elsewhere (no output schema or annotations).

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 has 100% description coverage, establishing baseline 3. The description adds no additional parameter context beyond what the schema already provides regarding the filter levels and clear flag.

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 resource 'console messages', with 'circular buffer' adding implementation context. Lacks explicit differentiation from siblings like pilot_page_text or pilot_evaluate, though 'console' implies browser console specifically.

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?

Provides no guidance on when to use this versus other data retrieval tools like pilot_page_text or pilot_evaluate, nor does it mention prerequisites (e.g., needing to enable console capture first).

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