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);
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states the basic action without mentioning any behavioral traits such as whether it requires the element to be visible or interactable, if it triggers events, error handling, or performance implications. This is inadequate for a tool that interacts with web elements.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence that directly states the tool's function without any unnecessary words. It is front-loaded and efficiently conveys the core action, making it easy to parse quickly. Every word earns its place by contributing to understanding the purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of interacting with web elements, lack of annotations, 0% schema coverage, and no output schema, the description is severely incomplete. It fails to address critical aspects like parameter meanings, behavioral expectations, error conditions, or return values, making it inadequate for safe and effective tool invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, meaning none of the parameters (selector, tabId, text) are documented in the schema. The description adds no information about what these parameters mean, their expected formats, or how they interact. For example, it doesn't explain that 'selector' identifies the input field or that 'tabId' specifies the browser tab, leaving the agent to guess.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Type text') and target ('into an input field'), making the purpose immediately understandable. It specifies the verb and resource, though it doesn't distinguish from sibling tools like 'send_key' which might have overlapping functionality. The description avoids tautology by not just repeating the tool name.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'send_key' or 'execute_script' for text input. It lacks any context about prerequisites, such as needing an input field to be present or focused, or when other methods might be more appropriate. This leaves the agent with minimal usage direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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

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