Skip to main content
Glama

Type into a field

browser_type
Destructive

Type text into a web form field, replacing existing content, using a snapshot ref or CSS/Playwright selector; optionally press Enter to submit.

Instructions

Type text into a field, replacing what it held, named by ref or selector as for browser_click. submit presses Enter afterwards.

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": {
      "session_id": "<session_id>",
      "text": "<text>"
    },
    "name": "browser_type"
  }
}

Input Schema

NameRequiredDescriptionDefault
refNoA ref from the latest `browser_snapshot`: for `[ref=e14]`, 'e14'. This or `selector`.
textYesWhat to type. It replaces whatever the field held.
submitNoPress Enter after typing.
timeoutNoSeconds; unset, 30.
selectorNoA CSS or Playwright selector. This or `ref`.
session_idYesThe session_id `browser_open` returned.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.14.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already flag destructiveHint, non-idempotent and openWorld, and the description explains the underlying reason: typing replaces whatever the field held, so a repeated call overwrites rather than accumulates. `submit` triggering Enter is also disclosed. It stops short of saying what happens when the ref is stale or missing, or whether typing fires key/input events.

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

Conciseness5/5

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

Two short sentences, front-loaded with the action and the destructive behavior, with the secondary submit behavior last. No filler or repetition.

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

Completeness4/5

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

For a six-parameter destructive browser tool with fully covered schema and no output schema, the description covers action, replacement behavior, targeting convention and Enter submission. It leaves unaddressed failure modes — invalid ref, unfocusable element — that an agent might want before calling.

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%, so every parameter including `ref`, `selector`, `submit` and `timeout` is already documented in structured form. The description restates the replacement and Enter semantics rather than adding new meaning, so the 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?

States a specific verb plus resource ("Type text into a field") and adds the key semantic that it replaces existing content, which separates it from a pure key-press tool. It does not explicitly name a sibling as a contrast, so 4 rather than 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?

Implicit guidance only: the mention that `ref`/`selector` work "as for `browser_click`" helps with parameter convention, and `submit` implies when to use this over a separate Enter press. There is no explicit when-to-use, when-not, or named alternative such as `browser_press`.

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