Skip to main content
Glama

browser_fill

Fill specified form fields in browser instances by providing an element selector and value. Part of the Concurrent Browser MCP server for managing multiple parallel browser sessions.

Instructions

Fill a form field

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
instanceIdYesInstance ID
selectorYesElement selector
timeoutNoTimeout in milliseconds
valueYesValue to fill

Implementation Reference

  • The main handler function for the 'browser_fill' tool. It retrieves the browser instance, locates the element by selector, fills it with the provided value using Playwright's page.fill method, and returns success or error status.
    private async fill(instanceId: string, selector: string, value: string, timeout: number): Promise<ToolResult> { const instance = this.browserManager.getInstance(instanceId); if (!instance) { return { success: false, error: `Instance ${instanceId} not found` }; } try { await instance.page.fill(selector, value, { timeout }); return { success: true, data: { selector, value, filled: true }, instanceId }; } catch (error) { return { success: false, error: `Fill failed: ${error instanceof Error ? error.message : error}`, instanceId }; } }
  • The input schema definition for the 'browser_fill' tool, specifying required parameters: instanceId, selector, value, and optional timeout.
    { name: 'browser_fill', description: 'Fill a form field', inputSchema: { type: 'object', properties: { instanceId: { type: 'string', description: 'Instance ID' }, selector: { type: 'string', description: 'Element selector', }, value: { type: 'string', description: 'Value to fill', }, timeout: { type: 'number', description: 'Timeout in milliseconds', default: 30000 } }, required: ['instanceId', 'selector', 'value'] } },
  • src/tools.ts:547-548 (registration)
    The switch case in executeTools method that registers and dispatches the 'browser_fill' tool call to the fill handler method.
    case 'browser_fill': return await this.fill(args.instanceId, args.selector, args.value, args.timeout || 30000);

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/sailaoda/concurrent-browser-mcp'

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