Skip to main content
Glama
Playwright MCP Server

Playwright MCP Server

by sohitmahato

playwright_type

Simulates keyboard typing into a browser input field selected by CSS selector, with optional delay between keystrokes for accurate form automation.

Instructions

Type text with keyboard simulation

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "selector": "<selector>",
      "text": "<text>"
    },
    "name": "playwright_type"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesText to type
delayNoDelay between keystrokes in ms
selectorYesCSS selector of input element

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden and does almost nothing with it. It does not say whether existing text is cleared or appended to, whether the element must be focused/visible, what happens if the selector is missing, or that typing mutates page state - all material for an input-simulation tool.

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

Conciseness4/5

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

A single short sentence with zero padding, but it is under-front-loaded for its complexity - the most decision-relevant fact (real keystroke simulation vs. direct fill) is only hinted at by the trailing phrase.

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

Completeness2/5

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

For a 3-parameter DOM-mutating tool with no annotations and no output schema, the definition says too little: typing behavior (clear vs. append), failure modes, and the distinction from playwright_fill are all absent. The agent could invoke it but has no basis for predicting its effect on existing field content.

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

Parameters3/5

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

Schema coverage is 100% and all three parameters (selector, text, delay) are documented in the schema, including units (ms) for the keystroke delay. The description adds nothing beyond that, which is acceptable given a fully documented schema, so baseline 3 applies.

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?

"Type text with keyboard simulation" gives a specific verb (type) and mechanism (keyboard simulation), which is enough to know it enters text into an element. It does not, however, distinguish it from the sibling playwright_fill, so an agent cannot tell from this definition alone why it would choose keystroke simulation over direct value setting.

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?

No when-to-use guidance at all: nothing states that this dispatches real key events (and thus triggers key handlers) whereas playwright_fill likely sets the value directly, nor when to use playwright_press_key. The agent must infer the choice among three text/key input siblings from names alone.

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