Skip to main content
Glama
merajmehrabi

Puppeteer MCP Server

by merajmehrabi

puppeteer_select

Select an option in a dropdown list using a CSS selector and a value.

Instructions

Select an element on the page with Select tag

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorYesCSS selector for element to select
valueYesValue to select

Implementation Reference

  • The handler case for 'puppeteer_select' which waits for the selector, then performs page.select() with the provided selector and value.
    case "puppeteer_select":
      try {
        await page.waitForSelector(args.selector);
        await page.select(args.selector, args.value);
        return {
          content: [{
            type: "text",
            text: `Selected ${args.selector} with: ${args.value}`,
          }],
          isError: false,
        };
      } catch (error) {
        return {
          content: [{
            type: "text",
            text: `Failed to select ${args.selector}: ${(error as Error).message}`,
          }],
          isError: true,
        };
      }
  • The tool definition/schema for 'puppeteer_select' including name, description, and inputSchema (selector, value).
    {
      name: "puppeteer_select",
      description: "Select an element on the page with Select tag",
      inputSchema: {
        type: "object",
        properties: {
          selector: { type: "string", description: "CSS selector for element to select" },
          value: { type: "string", description: "Value to select" },
        },
        required: ["selector", "value"],
      },
    },
  • src/server.ts:34-37 (registration)
    Registration of all tools (including puppeteer_select) via ListToolsRequestSchema handler using the TOOLS array.
    // Setup tool handlers
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: TOOLS,
    }));
  • src/server.ts:39-41 (registration)
    Registration of the CallToolRequestSchema handler which dispatches tool calls (including puppeteer_select) to handleToolCall.
    server.setRequestHandler(CallToolRequestSchema, async (request) =>
      handleToolCall(request.params.name, request.params.arguments ?? {}, state, server)
    );
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. The description only says 'Select an element', which is tautological. It does not disclose that the tool selects an option in a dropdown, that it triggers change events, or how it behaves with multiple selects. Minimal behavioral insight.

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

Conciseness3/5

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

The description is a single sentence, which is concise but lacks structure. It is not front-loaded with the most critical information (e.g., that it selects an option from a <select>). The brevity leaves gaps in understanding.

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 tool's simplicity and full schema coverage, the description should still explain the expected behavior (e.g., selecting an option, triggering events). No output schema exists, so the description should cover return values. It fails to provide enough context for an AI agent to invoke it correctly without confusion.

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% coverage with descriptions for both 'selector' and 'value'. The tool description adds no extra meaning beyond the schema. Baseline is 3, and the description does not compensate with additional context.

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 states 'Select an element on the page with Select tag', which indicates the tool interacts with a <select> element, but it is not explicitly clear that it selects an option from a dropdown. The verb and resource are present but vague. Sibling tools like puppeteer_fill suggest this is a distinct action, but the description lacks specificity.

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?

No usage guidelines are provided. The description does not indicate when to use this tool vs. alternatives (e.g., puppeteer_fill for text inputs, puppeteer_click for buttons). It fails to mention that it is specifically for <select> elements or that it changes the selected option.

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/merajmehrabi/puppeteer-mcp-server'

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