Skip to main content
Glama

pilot_fill

Clear and fill input fields or textareas using element references or CSS selectors for browser automation tasks.

Instructions

Clear and fill an input/textarea by @ref or CSS selector.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refYesElement ref (@e3) or CSS selector
valueYesValue to fill

Implementation Reference

  • The handler implementation for the `pilot_fill` tool.
    server.tool(
      'pilot_fill',
      'Clear and fill an input/textarea by @ref or CSS selector.',
      {
        ref: z.string().describe('Element ref (@e3) or CSS selector'),
        value: z.string().describe('Value to fill'),
      },
      async ({ ref, value }) => {
        await bm.ensureBrowser();
        try {
          const resolved = await bm.resolveRef(ref);
          if ('locator' in resolved) {
            await resolved.locator.fill(value, { timeout: 5000 });
          } else {
            await bm.getPage().fill(resolved.selector, value, { timeout: 5000 });
          }
          bm.resetFailures();
          return { content: [{ type: 'text' as const, text: `Filled ${ref}` }] };
        } catch (err) {
          bm.incrementFailures();
          return { content: [{ type: 'text' as const, text: wrapError(err) }], isError: true };
        }
      }
    );
  • Registration of the `pilot_fill` tool in the core toolset.
    'pilot_fill',
Behavior3/5

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

Discloses the critical 'Clear' behavior (element replacement vs. appending) which distinguishes it from pilot_type, but lacks other essential behavioral details like event triggering (input/change events), atomicity, or error handling when element not found.

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?

Single efficient sentence with zero waste. Front-loaded action ('Clear and fill'), immediate resource identification ('input/textarea'), and targeting mechanism all packed into 10 words.

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

Completeness4/5

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

Appropriately complete for a 2-parameter automation tool: covers the action, target types, and identification method. Could be improved with brief note on error conditions or event triggering, but sufficient for the complexity level.

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% coverage with clear descriptions. The description aligns with ('by @ref or CSS selector') but does not add semantic value beyond the schema—baseline 3 appropriate given schema carries the load.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Excellent specificity: 'Clear and fill' precisely describes the dual-phase action, 'input/textarea' identifies the target elements, and the @ref/CSS selector targeting method distinguishes it from coordinate-based siblings like pilot_click.

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?

Implies distinction from pilot_type (which likely simulates keystrokes without clearing) via the 'Clear and fill' phrasing, but lacks explicit guidance like 'Use pilot_type for appending text; use this for replacing existing content.'

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