puppeteer_fill
Automatically populate web form fields using CSS selectors to input specified values in browser automation workflows.
Instructions
Fill out an input field
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| selector | Yes | CSS selector for input field | |
| value | Yes | Value to fill |
Implementation Reference
- index.ts:280-300 (handler)Handler for the 'puppeteer_fill' tool. Waits for the CSS selector of the input field, types the provided value into it, and returns a success or error response.case "puppeteer_fill": try { await page.waitForSelector(args.selector); await page.type(args.selector, args.value); return { content: [{ type: "text", text: `Filled ${args.selector} with: ${args.value}`, }], isError: false, }; } catch (error) { return { content: [{ type: "text", text: `Failed to fill ${args.selector}: ${error.message}`, }], isError: true, }; }
- index.ts:139-150 (registration)Registration of the 'puppeteer_fill' tool in the TOOLS array used for listing available tools. Includes name, description, and input schema.{ name: "puppeteer_fill", description: "Fill out an input field", inputSchema: { type: "object", properties: { selector: { type: "string", description: "CSS selector for input field" }, value: { type: "string", description: "Value to fill" }, }, required: ["selector", "value"], }, },
- index.ts:451-451 (registration)Registration of the handleToolCall function as the handler for CallToolRequestSchema, which dispatches to specific tool cases including puppeteer_fill.server.setRequestHandler(CallToolRequestSchema, async (request) => handleToolCall(request.params.name, request.params.arguments ?? {}));
- index.ts:447-448 (registration)Handler for ListToolsRequestSchema that returns the TOOLS array containing the puppeteer_fill tool registration.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS,