Skip to main content
Glama
Browser Session MCP

Browser Session MCP

type

Destructive

Enters text into the first element matching a CSS selector, focuses it, and sends real key events so page input handlers fire; sets date, time, range, and color values directly.

Instructions

Type text into the first element matching a CSS selector in the session's active tab: waits up to timeout for it, clicks it to focus, then sends real key events for each character, so the page's input handlers fire. Plain language works too: a jev: prefix (e.g. jev: the email field) goes straight to the Jev decision model, and with TYPESAFE_API_KEY set on the server a selector that matches nothing as CSS is retried as a plain-language goal — Jev picks the input from the page's interactive elements (it errors rather than guesses); the text itself always comes from you. Use press_key afterwards for Enter or Tab, and press_key alone for single keys. clear empties the field first; without it, text is appended. delay paces the characters for pages that react to typing speed. A date, time, datetime-local, month, week, range or color input takes no typed text, so its value is set directly with the events the page listens for: dates as 2026-03-14 or 03/14/2026, times as 14:30 or 2:30 PM, a range as a number. Afterwards it reads the field back: it reports text the page reformatted (a phone mask), and fails when the field is empty afterwards (the page dropped the text). Target an input, textarea or contenteditable element; typing into a button reports success but changes nothing. Returns how many characters were typed, or the value set. Fails if the selector matches nothing within timeout and Jev can't (or isn't configured to) resolve 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": {
      "sessionId": "<sessionId>",
      "selector": "<selector>",
      "text": "<text>"
    },
    "name": "type"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesThe text to type.
clearNoEmpty the field's current value before typing. Default false, which appends.
delayNoMilliseconds to pause after each character, for pages that react to typing speed. Default 0.
timeoutNoMilliseconds to wait for `selector` to appear. Default 5000.
selectorYesCSS selector of the input, textarea or editable element. Or describe it in plain words — `jev:<goal>` (e.g. `jev: the email field`) goes straight to the Jev decision model, and when TYPESAFE_API_KEY is set a selector that matches nothing as CSS is retried as such a description.
sessionIdYesThe id returned by open_browser_session. Errors if no open session has it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.14
    • changedInput schema / properties / selector / description
      Previous value: -"CSS selector of the input, textarea or editable element."New value: +"CSS selector of the input, textarea or editable element. Or describe it in plain words — `jev:<goal>` (e.g. `jev: the email field`) goes straight to the Jev decision model, and when TYPESAFE_API_KEY is set a selector that matches nothing as CSS is retried as such a description."
  2. Changed6 schema fields changed
    • addedInput schema / properties / clear / description
      Added value: +"Empty the field's current value before typing. Default false, which appends."
    • addedInput schema / properties / delay / description
      Added value: +"Milliseconds to pause after each character, for pages that react to typing speed. Default 0."
    • addedInput schema / properties / selector / description
      Added value: +"CSS selector of the input, textarea or editable element."
    • addedInput schema / properties / sessionId / description
      Added value: +"The id returned by open_browser_session. Errors if no open session has it."
    • addedInput schema / properties / text / description
      Added value: +"The text to type."
    • addedInput schema / properties / timeout
      Added value: +{
      +  "description": "Milliseconds to wait for `selector` to appear. Default 5000.",
      +  "minimum": 1,
      +  "type": "integer"
      +}
  3. First observedv0.1.2

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true and openWorldHint=true, so the risk profile is partly covered. The description still adds real disclosure beyond that: the focus-click, appended-vs-cleared text, the read-back verification that detects page reformatting, and the failure modes (empty field afterwards, selector not resolved). That is more than the annotations carry, so it sits above the with-annotations baseline of 3, though the mutation risk implied by destructiveHint is not spelled out in the text itself.

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 purpose is front-loaded and nearly every sentence carries distinct information: alternatives, fallback behavior, input-type exceptions, verification, and failure. It runs long as one dense paragraph, and the README-style breadth (color inputs, phone masks, Jev configuration) could be tightened or split into scannable clauses.

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 six-parameter open-world mutation tool with no output schema, the description supplies the return value ('how many characters were typed, or the value set'), the post-condition checks, and the failure conditions. Nothing an agent needs to invoke it correctly, or to interpret the result, is missing.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3 and the schema already documents clear, delay, timeout, and selector. The description earns an extra point by adding meaning the schema does not: accepted date/time formats, the 'a range as a number' rule, and how the jev: plain-language fallback interacts with TYPESAFE_API_KEY.

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?

Opens with a precise verb-plus-resource-plus-scope statement: type text into the first element matching a CSS selector in the session's active tab, with the mechanics (wait for selector, click to focus, send real key events) stated immediately after. An agent can distinguish it from press_key and select_option without opening a schema.

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

Usage Guidelines5/5

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

Names the alternative explicitly with the condition that selects it ('Use press_key afterwards for Enter or Tab, and press_key alone for single keys'), and states the when-not case for element targets (typing into a button reports success but changes nothing). The non-text input types are also routed to their own behavior rather than left for the agent to discover.

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