Skip to main content
Glama

pilot_type

Simulates character-by-character typing into the focused element for rich text editors or fields with keystroke events. Use for autocomplete or keypress reactions; for standard inputs, use pilot_fill instead.

Instructions

Type text character-by-character into the currently focused element, simulating real keyboard input. Use when the user wants to type into a contenteditable div, rich text editor, or a field that reacts to individual keystrokes (e.g., autocomplete, keypress events). For standard / elements, prefer pilot_fill which is faster.

Parameters:

  • text: The text string to type

  • submit: Set to true to press Enter after typing (useful for search fields and forms)

Returns: Character count typed and whether Enter was pressed.

Errors:

  • "No element is focused": Nothing is focused on the page. Use pilot_click on the target field first.

  • Timeout: The page became unresponsive during typing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesText to type
submitNoPress Enter after typing

Implementation Reference

  • The 'pilot_type' tool handler registered via server.tool(). It types text character-by-character into the focused element using Playwright's keyboard.type(). Accepts 'text' (string) and optional 'submit' (boolean) parameters. Supports extension-based execution as well.
      server.tool(
        'pilot_type',
        `Type text character-by-character into the currently focused element, simulating real keyboard input.
    Use when the user wants to type into a contenteditable div, rich text editor, or a field that reacts to individual keystrokes (e.g., autocomplete, keypress events). For standard <input>/<textarea> elements, prefer pilot_fill which is faster.
    
    Parameters:
    - text: The text string to type
    - submit: Set to true to press Enter after typing (useful for search fields and forms)
    
    Returns: Character count typed and whether Enter was pressed.
    
    Errors:
    - "No element is focused": Nothing is focused on the page. Use pilot_click on the target field first.
    - Timeout: The page became unresponsive during typing.`,
          {
          text: z.string().describe('Text to type'),
          submit: z.boolean().optional().describe('Press Enter after typing'),
        },
        async ({ text, submit }) => {
          await bm.ensureBrowser();
          try {
            const ext = bm.getExtension();
            if (ext) {
              await bm.extSend('type', { text });
              if (submit) await bm.extSend('press', { key: 'Enter' });
              bm.resetFailures();
              return { content: [{ type: 'text' as const, text: `Typed ${text.length} characters${submit ? ' + Enter' : ''}` }] };
            }
            const page = bm.getPage();
            await page.keyboard.type(text);
            if (submit) await page.keyboard.press('Enter');
            bm.resetFailures();
            return { content: [{ type: 'text' as const, text: `Typed ${text.length} characters${submit ? ' + Enter' : ''}` }] };
          } catch (err) {
            bm.incrementFailures();
            return { content: [{ type: 'text' as const, text: wrapError(err) }], isError: true };
          }
        }
      );
  • Zod schema for pilot_type input parameters: 'text' (z.string()) and optional 'submit' (z.boolean()).
      {
      text: z.string().describe('Text to type'),
      submit: z.boolean().optional().describe('Press Enter after typing'),
    },
  • The tool name 'pilot_type' is listed in the CORE_TOOLS set, meaning it's included in all profiles (core, standard, full). The actual registration is via registerInteractionTools() which calls server.tool('pilot_type', ...).
    const CORE_TOOLS = new Set([
      'pilot_navigate',
      'pilot_snapshot',
      'pilot_snapshot_diff',
      'pilot_click',
      'pilot_fill',
      'pilot_type',
Behavior5/5

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

With no annotations provided, the description fully discloses behavior: character-by-character typing, return value (character count and whether Enter pressed), and error conditions (no focused element, timeout). This is comprehensive for a tool with no annotations.

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?

The description is well-structured with a clear first sentence stating purpose, followed by usage guidance, then parameter list, returns, and errors. Every sentence adds value, and the entire description is succinct.

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

Completeness5/5

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

Given the tool's moderate complexity (2 params, no output schema), the description covers purpose, usage guidelines, parameters, return values, and errors. It provides sufficient information for an AI agent to invoke the tool correctly.

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 description coverage is 100%, so baseline is 3. The description minimally adds context: 'text' as 'the text string to type' and 'submit' as 'set to true to press Enter', but these are nearly identical to the schema descriptions ('Text to type' and 'Press Enter after typing').

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?

The description clearly states the tool types text character-by-character into the focused element, simulating real keyboard input. It distinguishes itself from sibling pilot_fill by noting the appropriate use cases (contenteditable, rich text editors, keystroke-reactive fields) versus standard inputs.

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

Usage Guidelines5/5

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

The description explicitly provides when to use (contenteditable, rich text, fields reacting to keystrokes) and when not to use (prefer pilot_fill for standard inputs). It also gives a prerequisite hint (use pilot_click first if no focus) and explains the submit parameter usage.

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