Skip to main content
Glama
AdsPower

AdsPower LocalAPI MCP Server

Official

fill-input

Fill text into specified input fields on web pages using CSS selectors, enabling automated form completion and data entry tasks through browser automation.

Instructions

Fill the input

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorYesThe selector of the input to fill, find from the page source code
textYesThe text to fill in the input

Implementation Reference

  • The core handler function for the 'fill-input' tool. It checks browser connection, waits for the selector, fills the input with the provided text using Playwright, and returns a success message.
    async fillInput({ selector, text }: FillInputParams) { browser.checkConnected(); await browser.pageInstance!.waitForSelector(selector); await browser.pageInstance!.fill(selector, text); return `Filled input with selector: ${selector} with text: ${text} successfully`;
  • Zod schema defining the input parameters for the 'fill-input' tool: 'selector' (CSS selector of the input element) and 'text' (string to fill into the input). Used in tool registration for validation.
    fillInputSchema: z.object({ selector: z.string().describe('The selector of the input to fill, find from the page source code'), text: z.string().describe('The text to fill in the input') }).strict(),
  • Registration of the 'fill-input' tool in the MCP server using server.tool(), specifying name, description, input schema, and the wrapped handler from automationHandlers.
    server.tool('fill-input', 'Fill the input', schemas.fillInputSchema.shape, wrapHandler(automationHandlers.fillInput));

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/AdsPower/local-api-mcp-typescript'

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