Skip to main content
Glama

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
NameRequiredDescriptionDefault
selectorYes
tabIdNo
textYes

Implementation Reference

  • 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}'` }] };
  • 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'] } },
  • The dispatch case in the CallToolRequestSchema handler that routes 'type_text' calls to the typeText method.
    case 'type_text': return await this.typeText(args);

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/JediLuke/firefox-mcp-server'

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