Skip to main content
Glama

fill_form

Fill web form fields using CSS selectors, field names, or label text, then optionally submit. Works across modals and div-based UIs without requiring a boundary.

Instructions

Fill one or more form fields with values and optionally submit the form. Accepts field identifiers as CSS selectors, field names/IDs, or @eN references from page_map. Also resolves fields by visible label text page-wide — works in modals and div-based UIs without a boundary. Returns post-action page_state with the resulting URL and structural diff. Use form_selector to disambiguate when the page contains multiple forms.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
widenNoWhen true, return the full-page diff instead of scoping to the interacted container. Default: false.
fieldsYesMap of field identifiers to values. Keys can be CSS selectors ("input[name='email']"), field name/ID attributes ("email"), or @eN refs from page_map ("@e5"). Values are the text to type into each field.
submitNoIf true, submit the form after filling all fields (triggers form submission event). Default: false.
form_selectorNoCSS selector or @eN ref targeting a specific <form> element. Required when the page has multiple forms to disambiguate which form to fill.
Behavior4/5

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

With no annotations, the description carries full burden. It discloses that fields are resolved by label text, works in modals and div-based UIs, and returns page_state with URL and structural diff. No contradictions.

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 front-loaded with the main action. Every sentence adds value, with no wasted words. Well-structured.

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?

Given the complexity (4 parameters, nested object, no output schema), the description covers usage, behavioral traits, and parameter semantics well. It could detail return values more but is sufficient.

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 coverage is 100%, but the description adds meaning: explains field identifier types, when form_selector is needed, and defaults for submit and widen. Adds value beyond the schema.

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 it fills form fields and optionally submits, with a specific verb and resource. It distinguishes from sibling tools like click, select_option, etc. by focusing on form filling.

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 clear context on when to use the tool and how to disambiguate multiple forms using form_selector. It doesn't explicitly state when not to use, but the guidance is sufficient.

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/Mingye-Lu/AgenticCrawler'

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