Skip to main content
Glama

browser_input_text

Type text into an element by its number (emsn), or into whatever has focus when no emsn is given. Fails, typing nothing, when the field does not take focus.

Instructions

Type text into an element by its number (emsn), or into whatever has focus when no emsn is given. Fails, typing nothing, when the field does not take focus. Also sets a dropdown (SELECT, or its label): text is the option exactly as listed in its options; and a date (YYYY-MM-DD), time (HH:MM), date and time (YYYY-MM-DDTHH:MM), month (YYYY-MM), week (YYYY-Www) or colour (#rrggbb) field, without opening a picker. Use this rather than clicking a SELECT: its list is not in snapshots. To edit a text field or editable area (a mail body, a rich-text editor) in the middle, give one of before / after / replace / at with its emsn. Copy the words from its snapshot value as they are written there: \n for a line break, ¤ escapes kept; ‸ (the caret) and ⟦⟧ (the selection) are ignored. Not found, or found in several places without occurrence: nothing is typed and the places are listed. The text is read back afterwards and the reply quotes the changed lines; if they differ (the editor reformatted it), it fails saying the text was typed. Without these, text goes in at the caret; the element is clicked first unless focus is already in it. Text is typed key by key, about 50 characters a second: a few thousand take a minute or more, and the call waits for it.

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": {
      "snapshotId": "<snapshotId>",
      "text": "<text>"
    },
    "name": "browser_input_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
atNoType at the start or end of the element's text.
emsnNoElement number to type into.
textYesThe text to type, as it is; empty with replace deletes.
afterNoType just after these words.
tabIdNoTab to act on. Defaults to the foreground tab of that window.
beforeNoType just before these words.
replaceNoReplace these words with text.
windowIdNoWindow to act on. Defaults to the frontmost window.
clearTextNoClear the field first instead of appending. Not with a place: it clears a whole mail body, quote and signature too.
occurrenceNoWhich place, from 1, when the words are in several; overlaps count.
pressEnterNoPress Enter after typing, as a person does: it submits a form, and adds a line in a multi-line box.
snapshotIdYesThe snapshotId from the browser_take_snapshot you picked the emsn out of. An element keeps its emsn while the page stays (no navigation or reload), so with an emsn any snapshot of the current page is accepted; with x,y only the latest one is. A number whose element has gone is refused rather than clicked.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

Score is being calculated.