Skip to main content
Glama

browser_fill

Set or replace the value of an input or textarea in browser automation, using an element ref, CSS selector, or visible label.

Instructions

Set the value of an input or textarea (replaces its text).

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

Input Schema

NameRequiredDescriptionDefault
refNoref from browser_snapshot
textNoVisible text/label, instead of ref
stateNotrue: full page state
valueYesThe new value
selectorNoCSS selector, instead of ref
snapshotNoSnapshot after the action

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv0.9.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / ref / description
      Previous value: -"Element ref from browser_snapshot, e.g. 12"New value: +"ref from browser_snapshot"
    • changedInput schema / properties / selector / description
      Previous value: -"CSS selector (first match), instead of ref"New value: +"CSS selector, instead of ref"
    • changedInput schema / properties / snapshot / description
      Previous value: -"Also return the page snapshot after the action"New value: +"Snapshot after the action"
    • addedInput schema / properties / state
      Added value: +{
      +  "description": "true: full page state",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / text / description
      Previous value: -"Visible text or label of the element, instead of ref"New value: +"Visible text/label, instead of ref"
    • changedInput schema / properties / value / description
      Previous value: -"The text the field ends up with"New value: +"The new value"
  2. First observedv0.7.1

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden, and it discloses only that existing text is replaced. It says nothing about whether the action triggers input/change events, whether it fails on non-input elements like select or contenteditable, permission or page-readiness requirements, or what the caller gets back. The overwrite note is genuine added value, but far short of what a mutation tool with zero annotation coverage needs.

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?

One short sentence, front-loaded with the action and the overwrite caveat; nothing is padding. It is lean to the point that the missing routing guidance and side-effect notes would have been worth the extra words.

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

Completeness3/5

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

For a 6-parameter page-mutating tool with no annotations and no output schema, the definition covers only the core action and the replacement semantics. The schema fully documents parameters, but an agent still lacks guidance on element targeting precedence, side effects, and expected results.

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 description coverage is 100%, so ref, text, selector, value, state and snapshot are each documented in the schema, which sets the baseline at 3. The description adds only the element-type constraint (input/textarea) and does not explain the mutual exclusivity or precedence among ref, selector and text, so it adds little beyond the schema.

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 (set the value) and resource (input or textarea), and the parenthetical clarifies it overwrites rather than appends. It does not explicitly distinguish itself from the sibling browser_type, which sounds similar, so the agent must infer the difference.

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

Usage Guidelines2/5

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

No when-to-use, when-not-to-use, or alternative guidance is given. With a sibling named browser_type that plausibly also writes text into elements, the description should say which one to pick, but it offers nothing.

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