Skip to main content
Glama

fill_field

Type values into form fields, using direct fill or simulated keystrokes to pass trusted-event checks, with optional Tab to move to the next field.

Instructions

Type a value into a form field.

Standard mode (use_keyboard=False, default): sets the field value directly. Works for plain <input> and <textarea> elements.

Keyboard mode (use_keyboard=True): simulates real keystrokes (keydown → keypress → input → keyup per character). Use this for:

  • contenteditable divs (X/Twitter post box, Notion, Slack, etc.)

  • React / Vue inputs that ignore programmatic .value changes

  • Sites that check for "trusted" input events to prevent botting

For X (Twitter): click the "What's happening?" box first, then call fill_field with use_keyboard=True. This fires the React-compatible events that enable the Post button.

Args: selector: CSS selector for the input or contenteditable element. value: Text to type. Never include \n — it will be stripped. A trailing \n is treated as Tab (advance to next field). press_tab: Press Tab after filling to move focus to the next field. use_keyboard: Simulate real keystrokes instead of direct fill. delay_ms: Milliseconds between keystrokes in keyboard mode. 0 = fast (default). Use 30–80 for sites that check typing cadence.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valueYes
delay_msNo
selectorYes
press_tabNo
use_keyboardNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations, the description carries full behavioral burden—and it excels. It details the simulated keystroke event sequence (keydown→keypress→input→keyup), explains that \n is stripped and a trailing \n acts as Tab, and clarifies delay_ms for sites checking typing cadence. It also reveals why keyboard mode is needed for frameworks that ignore programmatic value changes.

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?

The description is well-structured with clear sections and bullet lists. It is moderately long but every sentence carries useful information; the X/Twitter-specific recipe is somewhat niche but relevant. No wasted words, and the layout aids scanning.

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

Completeness5/5

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

Given the tool's complexity (two modes, five parameters), the description is thorough. It covers behavioral edge cases (\n handling, Tab emulation), parameter semantics, and concrete use cases for modern frameworks. Since an output schema is present, not detailing return values is acceptable. An agent has everything needed to invoke this tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0% description coverage, but the description's Args section compensates fully. Each parameter (selector, value, press_tab, use_keyboard, delay_ms) is explained with functional meaning and edge-case behavior. For example, it notes that a trailing \n in value is treated as Tab, and recommends delay_ms 30–80 for cadence checks—details the schema cannot convey.

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 opens with a clear verb+resource statement: 'Type a value into a form field.' It then differentiates standard mode from keyboard mode, specifying that keyboard mode is for contenteditable divs and React/Vue inputs. This establishes the tool's unique role among siblings like click and submit_form.

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 provides strong conditional guidance: standard mode for plain inputs/textareas, keyboard mode for contenteditable/React/Vue/trusted-event checks. It even gives a specific recipe for X/Twitter. However, it does not explicitly name alternative tools to use instead, nor does it state when *not* to use this tool, so it lacks full exclusionary guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Dominic-Pi-Sunyer/web-speed-agent'

If you have feedback or need assistance with the MCP directory API, please join our Discord server