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));
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden but fails to disclose behavioral traits. It doesn't mention whether this requires an active browser session, what happens on errors (e.g., if selector is invalid), or any side effects like page changes. This leaves critical operational context unspecified.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with just three words, front-loading the core action. However, it is under-specified rather than efficiently informative, as it lacks necessary details that would earn its place, slightly reducing its effectiveness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and a simple input schema, the description is incomplete. It doesn't explain the tool's role in browser automation (implied by sibling tools) or what 'fill' entails (e.g., typing, setting value), leaving gaps for effective agent use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with clear parameter descriptions in the schema (e.g., 'selector' as from page source code, 'text' as content to fill). The tool description adds no additional meaning beyond the schema, so it meets the baseline of 3 without compensating or detracting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Fill the input' is a tautology that restates the tool name without adding meaningful context. It specifies the verb 'fill' and resource 'input' but lacks specificity about what kind of input (e.g., web page form field) or how it operates, making it vague compared to more descriptive alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like 'select-option' or 'press-key' for similar input interactions. The description offers no context, prerequisites, or exclusions, leaving the agent without direction for appropriate tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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

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