Skip to main content
Glama

puppeteer_select

Automate browser interactions by selecting elements with a 'select' tag using a CSS selector and specified value, enabling precise web control for testing or automation tasks.

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

  • Handler function for 'puppeteer_select' tool: waits for the selector, selects the specified value in the select element, and returns success or error message.
    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.message}`, }], isError: true, }; }
  • Input schema definition for the 'puppeteer_select' tool, specifying selector and value parameters.
    { 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"], }, },
  • index.ts:447-449 (registration)
    Registration of all tools including 'puppeteer_select' via the ListToolsRequestSchema handler that returns the TOOLS array.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS, }));
  • index.ts:451-451 (registration)
    Registration of the generic tool call handler that dispatches to specific tool implementations based on name.
    server.setRequestHandler(CallToolRequestSchema, async (request) => handleToolCall(request.params.name, request.params.arguments ?? {}));

Other Tools

Related 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/PhialsBasement/MCP-Puppeteer-Linux'

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