Skip to main content
Glama

browser_fill

Fill a browser input field matched by a CSS selector with a value, replacing existing text; pass an empty string to clear it.

Instructions

Fill an input field matched by selector with value; fill replaces the whole value — pass "" to clear the field (browser_type appends keystrokes). Reports delivery and retry.

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
valueYes
selectorYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.1
    • changedInput schema / required
      Previous value: -[
      -  "selector"
      -]New value: +[
      +  "selector",
      +  "value"
      +]
  2. Changed1 schema field changedv0.2.6
    • addedInput schema / required
      Added value: +[
      +  "selector"
      +]
  3. First observedv0.1.2

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare the mutation profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false, openWorldHint=true). The description adds real behavioral context beyond that: the operation overwrites the entire field value rather than appending, an empty string clears the field, and the call reports delivery plus retry information. It does not describe failure behavior when the selector matches nothing or is not fillable.

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?

A single dense sentence, front-loaded with the core action, using a dash and parenthetical only to carry the highest-value distinctions (replace-vs-append, empty-string clear). No filler and nothing repeated from the schema or annotations.

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 two-parameter, no-output-schema tool, the definition covers purpose, the key sibling distinction, the clear-field idiom, and hints at the return (delivery and retry reporting). Remaining gaps around selector syntax and not-found/non-fillable behavior are minor but real.

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 description coverage is 0%, so the description must carry parameter meaning, and it does: `selector` must match an input field, and `value` replaces the field's entire contents with "" acting as a clear. It still does not specify selector syntax (CSS vs XPath) or value typing constraints, leaving some ambiguity.

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 an input field matched by selector with value") and immediately differentiates itself from the sibling browser_type by noting that fill replaces the whole value while browser_type appends keystrokes. An agent can pick between the two without opening either 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?

Gives clear routing guidance against the nearest alternative: use fill to set/replace a value, use browser_type to append keystrokes, and pass "" to clear. It does not cover other conditions such as whether the selector must already be visible or what to do if the element is not editable, so it falls short of full when/when-not guidance.

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