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',

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