Skip to main content
Glama

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
NameRequiredDescriptionDefault
selectorYesCSS selector for input field
valueYesValue to fill

Implementation Reference

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

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/PhialsBasement/MCP-Puppeteer-Linux'

If you have feedback or need assistance with the MCP directory API, please join our Discord server