Skip to main content
Glama

browsercat_select

Select specific options from dropdown menus using CSS selectors to automate form interactions and web navigation tasks.

Instructions

Select an option from a dropdown menu

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorYesCSS selector for select element
valueYesValue to select

Implementation Reference

  • Handler implementation for the 'browsercat_select' tool. Waits for the selector, selects the option with the given value using Puppeteer's page.select, and returns success or error message.
    case "browsercat_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, }; }
  • Schema definition for the 'browsercat_select' tool, including name, description, and input schema requiring 'selector' and 'value' parameters.
    { name: "browsercat_select", description: "Select an option from a dropdown menu", inputSchema: { type: "object", properties: { selector: { type: "string", description: "CSS selector for select element" }, value: { type: "string", description: "Value to select" }, }, required: ["selector", "value"], }, },
  • index.ts:421-423 (registration)
    Registration of the tools list, which includes the 'browsercat_select' tool schema, via the ListToolsRequestSchema handler.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS, }));
  • index.ts:425-427 (registration)
    Registration of the CallToolRequestSchema handler, which dispatches to handleToolCall containing the 'browsercat_select' case.
    server.setRequestHandler(CallToolRequestSchema, async (request) => handleToolCall(request.params.name, request.params.arguments ?? {}) );

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/pipethedev/browsercat-mcp-server'

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