Skip to main content
Glama

Set a form field value

form_input

Set a form element's value by its ref, using booleans for checkboxes/radios and option values or visible text for selects. Use it to fill or update fields in a controlled browser tab.

Instructions

Set the value of a form element identified by ref (from read_page/find). For checkboxes/radios pass a boolean; for selects pass the option value or visible text; otherwise a string.

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": {
      "ref": "<ref>",
      "value": "<value>",
      "tabId": "<tabId>"
    },
    "name": "form_input"
  }
}

Input Schema

NameRequiredDescriptionDefault
refYesElement ref from read_page/find
tabIdYesTarget tab ID (must be in the MCP group)
valueYesValue to set (boolean for checkbox/radio)
expectNoOptional postcondition: observes the declared UI outcome after one action; failure never repeats input
documentIdNoBind a resolved target to this document; stale documents fail before mutation

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.24.1

TDQS

A3.5/5.0
Behavior2/5

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

With no annotations at all, the description carries the full burden, yet it says nothing about what setting a value actually does: whether it focuses the element, dispatches input/change events, blurs, validates, or throws on a non-form target. It also does not describe the return value or error behavior when the ref is stale, which matters for a DOM-mutating action.

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 sentences, front-loaded with the action and the identifying parameter, then the type-dispatch rules. No filler or restatement of the title.

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?

The tool has five parameters including a nested expect postcondition object and documentId, plus no annotations and no output schema. The description covers the core set-value path but leaves the postcondition semantics and return behavior entirely to the schema, which is thin for a mutation tool with nested parameters.

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 the baseline is 3. The description's select-specific rule ('option value or visible text') adds genuine meaning beyond the schema, but the checkbox/radio boolean hint merely restates the schema's own 'boolean for checkbox/radio' wording, and tabId, expect, and documentId go unmentioned.

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 and resource: 'Set the value of a form element identified by ref,' and ties the ref to its producers (read_page/find). It is clearly distinct from read-only siblings, but it never contrasts itself with fill_form, so an agent cannot tell whether to set one field or batch-fill from the text alone.

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 concrete per-type invocation guidance (boolean for checkbox/radio, option value or visible text for select, else string) and implies the prerequisite sequence of resolving a ref via read_page/find first. What is missing is explicit routing: no statement about when to prefer fill_form, browser_batch, or computer over this tool.

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