Skip to main content
Glama

browser_fill

Fill a form input field with a value using CSS or text selectors; auto-scrolls and focuses the element, and works on CSP-strict sites via Chrome Debugger API.

Instructions

Fill a form input field with a value. Supports CSS selectors AND text-based selectors. Auto-scrolls and focuses the element. Works on CSP-strict sites via Chrome Debugger API. For date inputs use browser_set_date, for autocomplete/combobox use browser_set_combobox. With a text selector the field is clicked first, so the same check as browser_click applies: if the mouse would not reach it at its center, nothing is typed and the answer is ok:false with error "covered".

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": {
      "selector": "<selector>",
      "value": "<value>"
    },
    "name": "browser_fill"
  }
}

Input Schema

NameRequiredDescriptionDefault
valueYesValue to fill in
selectorYesCSS selector or text selector for the input field
partitionNoRun this call in a partition from browser_partition (an id like "p1"). Leave it out for the default partition. An unknown or closed id is an error; the call is never sent to the default partition instead.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.33.0
    • addedInput schema / properties / partition
      Added value: +{
      +  "description": "Run this call in a partition from browser_partition (an id like \"p1\"). Leave it out for the default partition. An unknown or closed id is an error; the call is never sent to the default partition instead.",
      +  "type": "string"
      +}
  2. First observedv1.0.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does well: it discloses auto-scroll and focus, the Chrome Debugger API path for CSP-strict sites, and the concrete failure mode ('covered' with ok:false, nothing typed) for text selectors. It stops short of stating behavior on other failures (missing element, disabled field, timeouts) or whether an existing value is replaced.

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?

Front-loaded with the core action, then selector modes, then sibling routing, then the edge case. Dense but every sentence carries operational information; the trailing error-format sentence is the wordiest part but still actionable.

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 3-parameter tool with no output schema and no annotations, the description covers the main behavioral risks an agent must know: selector kinds, scrolling/focus, CSP handling, and one failure path. Remaining gaps (existing value handling, other failure modes, timing) are modest.

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 baseline is 3, but the description adds real meaning to the selector parameter by explaining the two selector families and that a text selector triggers a click with an occlusion check. The value and partition parameters get no extra semantics beyond the schema.

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?

States a specific verb and resource ('Fill a form input field with a value') and immediately distinguishes itself from browser_set_date and browser_set_combobox by naming the cases those siblings own. An agent can route correctly without opening any 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?

Explicit alternatives are named with the condition that selects them: date inputs go to browser_set_date, autocomplete/combobox goes to browser_set_combobox. It also flags that text selectors behave like browser_click, which tells the agent when an earlier overlay-clearing step is needed.

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