Skip to main content
Glama
devskido

Playwright MCP Server

by devskido

playwright_fill

Fill input fields on web pages using CSS selectors to automate form completion or data entry tasks 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

  • The FillTool.execute method implements the core logic of the 'playwright_fill' tool. It waits for the specified selector to appear, then uses Playwright's page.fill() to input the value into the element.
    export class FillTool extends BrowserToolBase { /** * Execute the fill tool */ async execute(args: any, context: ToolContext): Promise<ToolResponse> { return this.safeExecute(context, async (page) => { await page.waitForSelector(args.selector); await page.fill(args.selector, args.value); return createSuccessResponse(`Filled ${args.selector} with: ${args.value}`); }); } }
  • Tool schema definition for 'playwright_fill', specifying name, description, and input schema requiring 'selector' and 'value' parameters.
    { name: "playwright_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"], }, },
  • Registration of 'playwright_fill' in the main tool handler switch statement, dispatching execution to the FillTool instance.
    case "playwright_iframe_fill": return await iframeFillTool.execute(args, context); case "playwright_fill": return await fillTool.execute(args, context);
  • Import of FillTool from interaction.js, necessary for tool instantiation and execution.
    import { ClickTool, IframeClickTool, FillTool, SelectTool, HoverTool, EvaluateTool, IframeFillTool, UploadFileTool } from './tools/browser/interaction.js'; import {
  • 'playwright_fill' listed in BROWSER_TOOLS array, used for conditional browser launching.
    "playwright_iframe_fill", "playwright_fill",

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/devskido/customed-playwright'

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