pilot_type
Type text character by character into focused web elements for automated browser interactions.
Instructions
Type text into the currently focused element (character by character).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Text to type | |
| submit | No | Press Enter after typing |
Implementation Reference
- src/tools/interaction.ts:137-157 (handler)Implementation of the pilot_type tool handler in src/tools/interaction.ts.
server.tool( 'pilot_type', 'Type text into the currently focused element (character by character).', { text: z.string().describe('Text to type'), submit: z.boolean().optional().describe('Press Enter after typing'), }, async ({ text, submit }) => { await bm.ensureBrowser(); try { 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 }; } } );