Skip to main content
Glama

page.type

Types text into a specified web page element with real key events so each keystroke is registered, then reads the field back to verify what landed.

Instructions

Type text into an element, with real key events so the page sees each keystroke. Newlines become Enter in textareas and contenteditables; on a single-line input they are reported as dropped rather than silently flattened. Reads the field back so landed_characters is measured, not assumed.

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": {
      "text": "<text>"
    },
    "name": "page.type"
  }
}

Input Schema

NameRequiredDescriptionDefault
nthNoZero-based index when the locator matches several elements.
refNoSnapshot ref (eNN) from page.snapshot.
textYes
clearNoClear the field first.
xpathNoXPath expression.
delay_msNo
frame_idNoFrame to search within; see page.list_frames.
selectorNoCSS selector; pierces shadow DOM.
target_idNoTarget handle (tgt_*). Omit for the active page.
browser_idNoBrowser handle (br_*). Omit to use the only running browser, or auto-launch one.
insert_textNoPaste in one Input.insertText instead of per-key events. Much faster and newline-safe, but the page sees no keydown/keyup.
press_enterNo
backend_node_idNoCDP backendNodeId, e.g. from inspector.pick.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false and openWorldHint=true, so the description adds real value: it discloses that keystrokes are dispatched as genuine key events, that newlines become Enter in textareas/contenteditables, and that on single-line inputs newlines are reported as dropped rather than silently flattened. It also reveals a post-write readback that yields landed_characters, which is behavioral detail an agent cannot get from the annotations. It stops short of covering focus requirements or failure modes for ambiguous locators.

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?

Three dense sentences, front-loaded with the core action, then the newline edge case, then the verification behavior. No filler or repetition, though the middle clause is compressed enough that a reader must parse it twice.

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

Completeness5/5

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

For a 13-parameter mutation tool with no output schema, the description covers the mechanism, the input-format edge case, and the fact that results are verified via landed_characters. That is the right information density given the schema already documents locator and handle parameters.

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 description coverage is 77%, close to the threshold where the schema itself carries parameter meaning, so the baseline applies. The description adds no per-parameter guidance; the insert_text speed/keydown trade-off and the newline semantics live in the schema, and the text parameter itself is undocumented in both places.

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 into an element, with real key events so the page sees each keystroke" gives a specific verb plus resource and pins down the mechanism (real key events) that separates it from a paste-style operation. It does not name a sibling such as page.press, so differentiation from that tool is left to inference, keeping it below a 5.

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

Usage Guidelines3/5

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

The newline discussion implicitly tells the agent this tool is appropriate for multi-line fields, but there is no explicit when-to-use / when-not-to-use statement and no routing to alternatives. The speed-versus-fidelity trade-off against Input.insertText exists only in the schema, not here, so usage guidance is implied rather than stated.

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

Deploy Server

Other Tools