Skip to main content
Glama

browsercat_fill

Automatically populate web form fields using CSS selectors to input specified values, enabling automated data entry in browser interactions.

Instructions

Fill out an input field

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorYesCSS selector for input field
valueYesValue to fill

Implementation Reference

  • The handler for the 'browsercat_fill' tool. It waits for the specified selector to appear, types the provided value into the input field using Puppeteer's page.type method, and returns success or error message.
    case "browsercat_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 as Error).message}`, }], isError: true, }; }
  • Tool definition including name, description, and input schema for 'browsercat_fill'. Defines required parameters: selector (CSS selector for input) and value (string to fill).
    { name: "browsercat_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:421-423 (registration)
    Registration of all tools (including browsercat_fill) via the ListToolsRequestSchema handler, which returns the TOOLS array containing the tool definitions.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS, }));
  • index.ts:425-427 (registration)
    Registration of the CallToolRequestSchema handler, which dispatches tool calls (including browsercat_fill) to the handleToolCall function based on the tool name.
    server.setRequestHandler(CallToolRequestSchema, async (request) => handleToolCall(request.params.name, request.params.arguments ?? {}) );

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/pipethedev/browsercat-mcp-server'

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