Skip to main content
Glama

fill

Writes a value into an input field in a Safari tab, dispatching input and change events so frameworks like React and Google Forms recognize it.

Instructions

Type a value into an input, textarea, or contenteditable element.

Sets the value through the element's native setter and then dispatches input and change with bubbles: true. That matters: Google Forms, React and other frameworks listen for those events and ignore a bare assignment to .value, so a naive fill looks correct on screen and submits empty.

Args: tab: Tab index within window 1, or a substring of its URL or title. selector: CSS selector for the field. value: The text to enter. index: Which match to fill when the selector hits several. Default 0.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tabYes
indexNo
valueYes
selectorYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

The description discloses a critical behavioral trait: it uses the native setter and dispatches input/change events with bubbles: true. This goes beyond what annotations provide (none) and explains why the tool behaves differently from a simple value assignment. It also notes the consequence of not doing this (forms submit empty). However, it doesn't mention potential side effects like triggering validation or focus changes.

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?

The description is concise and well-structured. It opens with a one-sentence summary, then explains the important behavioral detail about event dispatch, and finally lists parameters in a clear Args block. Every sentence earns its place, and the critical information about native setters and events is front-loaded.

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?

The description is complete for a form-filling tool. It covers the key behavioral nuance (event dispatch), explains all parameters, and the output schema exists so return values don't need explanation. It could mention edge cases like non-interactive elements or disabled fields, but these are minor gaps given the tool's simplicity.

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 compensate. It explains the 'tab' parameter as 'Tab index within window 1, or a substring of its URL or title,' which adds meaning beyond the schema's bare 'Tab' title. It also explains 'index' as 'Which match to fill when the selector hits several. Default 0.' The 'value' and 'selector' parameters are self-explanatory from their names, but the description adds context for the two less obvious ones.

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?

The description clearly states the tool's purpose: 'Type a value into an input, textarea, or contenteditable element.' It uses a specific verb ('fill') and resource (form fields), and distinguishes itself from siblings like click and run_js by focusing on setting values with native setters and dispatching events.

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?

The description explains why this tool is needed over a naive assignment, mentioning frameworks like React and Google Forms that require input/change events. It doesn't explicitly name alternatives, but the context about event dispatch implies when to use this tool versus simpler approaches. It could be improved by explicitly stating when not to use it (e.g., for clicking buttons, use click).

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