type_text
Input text into specified fields on Firefox using Playwright automation. Automate form filling or data entry by defining selectors and text content through the MCP-enabled Firefox server.
Instructions
Type text into an input field
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| selector | Yes | ||
| tabId | No | ||
| text | Yes |
Implementation Reference
- index-multi-debug.js:1086-1098 (handler)The main handler function for the 'type_text' tool. It uses Playwright's page.fill() to input text into the specified selector in the target tab.async typeText(args) { this.ensureBrowserRunning(); const { selector, text, tabId } = args; const page = this.getPage(tabId); await page.fill(selector, text); return { content: [{ type: 'text', text: `Typed "${text}" into '${selector}' in tab '${tabId || this.activeTabId}'` }] };
- index-multi-debug.js:113-125 (schema)The input schema and metadata for the 'type_text' tool, defining required parameters selector and text, optional tabId.{ name: 'type_text', description: 'Type text into an input field', inputSchema: { type: 'object', properties: { selector: { type: 'string' }, text: { type: 'string' }, tabId: { type: 'string' } }, required: ['selector', 'text'] } },
- index-multi-debug.js:411-412 (registration)The dispatch case in the CallToolRequestSchema handler that routes 'type_text' calls to the typeText method.case 'type_text': return await this.typeText(args);