Skip to main content
Glama

browser_input_text

Types text into browser elements by number or focus, including dropdowns, dates, times, and mid-field edits without opening pickers.

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.

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

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does: it discloses that it types nothing when the field will not take focus, that it fails and lists locations on ambiguous/absent anchor matches, that it reads text back and fails if the editor reformatted it, and that clearText wipes an entire mail body including quote and signature. It also warns that Enter submits a form. These are exactly the failure modes an agent needs before calling a mutating UI 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?

The main action is front-loaded and no sentence is padding given 12 parameters and several input modes. However, phrasing like 'Fails, typing nothing, when the field does not take focus' is convoluted, and the middle paragraph packs anchors, escaping, ambiguity and read-back verification into a single dense block that is harder to scan than it needs to be.

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?

No annotations, no output schema, 12 parameters and multiple elements types—yet the description still covers targeting, defaults, failure modes, the verification-and-quote reply, and destructive side effects. Nothing an agent needs to call this safely is missing.

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

Parameters5/5

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

Schema coverage is already 100%, so baseline would be 3, but the description adds real meaning on top: how to spell the anchor words from the snapshot value, that \n is a line break and ¤ marks kept escapes, that the ‸ caret and ⟦⟧ selection markers are ignored, and how occurrence resolves duplicates. That is operational detail absent from the schema text.

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

Purpose5/5

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

A precise verb plus resource: 'Type text into an element by its number (emsn), or into whatever has focus when no emsn is given.' It goes further and enumerates the element classes it covers (SELECT, date/time/week/month/colour fields, editable areas), so an agent can match the tool to the target element without opening the schema.

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

Usage Guidelines4/5

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

It explicitly routes one case away from a sibling: 'Use this rather than clicking a SELECT: its list is not in snapshots.' It also clarifies the default path ('text goes in at the caret; the element is clicked first unless focus is already in it'). It does not distinguish itself from browser_press_key or browser_select_editable_text, so the guidance is strong but not exhaustive.

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