Skip to main content
Glama
afshawnlotfi

Configurable Puppeteer MCP Server

by afshawnlotfi

puppeteer_fill

Automatically populate web form fields using CSS selectors to input specified values for browser automation tasks.

Instructions

Fill out an input field

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorYesCSS selector for input field
valueYesValue to fill

Implementation Reference

  • The handler logic for the puppeteer_fill tool. Waits for the selector, types the value into the input field, and returns a success or error message.
    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 as Error).message}`,
          }],
          isError: true,
        };
      }
  • Input schema definition for the puppeteer_fill tool, specifying selector and value parameters.
    {
      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:410-412 (registration)
    Registration of the tools list handler, which exposes the puppeteer_fill tool via the TOOLS array.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: TOOLS,
    }));
  • index.ts:414-416 (registration)
    Registration of the call tool handler, which dispatches to the specific puppeteer_fill implementation in handleToolCall.
    server.setRequestHandler(CallToolRequestSchema, async (request) =>
      handleToolCall(request.params.name, request.params.arguments ?? {})
    );
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('fill out') but doesn't cover critical traits like whether it requires a loaded page, if it waits for the element to be visible, error handling for invalid selectors, or side effects (e.g., triggering events). For a mutation tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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

Conciseness5/5

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

The description is a single, efficient sentence ('Fill out an input field') that directly states the core action without unnecessary words. It's front-loaded and wastes no space, making it highly concise and well-structured for quick comprehension.

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 the complexity of a web automation tool with 2 parameters, no annotations, and no output schema, the description is incomplete. It doesn't address behavioral aspects like error conditions, dependencies on other tools (e.g., navigation first), or what happens after filling (e.g., does it submit?). For a mutation tool in a sibling-rich environment, more context is needed to ensure safe and effective 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?

The input schema has 100% description coverage, with clear documentation for 'selector' (CSS selector) and 'value' (value to fill). The description adds no additional meaning beyond this, as it doesn't explain parameter interactions, constraints, or examples. Given the high schema coverage, a baseline score of 3 is appropriate, as the schema handles the heavy lifting without extra value from the description.

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

Purpose3/5

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

The description 'Fill out an input field' clearly states the verb ('fill out') and resource ('input field'), making the basic purpose understandable. However, it lacks specificity about the context (e.g., web page automation) and doesn't differentiate from siblings like 'puppeteer_click' or 'puppeteer_select', which could also interact with input fields. This results in a vague but functional purpose statement.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., requiring a page to be loaded), exclusions (e.g., not for non-input elements), or comparisons to siblings like 'puppeteer_select' for dropdowns. Without such context, users must infer usage from the tool name alone.

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/afshawnlotfi/mcp-configurable-puppeteer'

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