Skip to main content
Glama

browser_get_form

Extract form field details from web pages to identify input elements, their properties, and associated labels before automated form filling.

Instructions

Inspect all form fields (input, select, textarea, button) within a CSS-selector-specified container and return their name, type, id, current value, hint text, disabled/readOnly state, and associated label text (resolved via for[id], ancestor LABEL, aria-labelledby, aria-label in that order). Use this before browser_fill_input to discover exact field selectors and avoid accidentally targeting the wrong input (e.g. a global search bar). Caveats: Requires browser_connect (CDP active). Hidden inputs (type=hidden) are excluded by default — set includeHidden:true if needed. Value text is truncated at 200 chars.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorYesCSS selector for the form or container element to inspect (e.g. '#login-form', '.search-bar'). All input, select, textarea, and button descendants are returned.
includeHiddenNoWhen true, include hidden inputs (type=hidden). Default false to avoid CSRF-token / serialized-state clutter.
maxResultsNoMaximum number of form fields to return (default 100).
tabIdNoTab ID from browser_connect. Omit to use the first page tab.
portNoChrome/Edge CDP remote debugging port.
includeContextNoWhen true, append activeTab and readyState context to the response.
Behavior4/5

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

With no annotations provided, the description carries full burden and does well by disclosing key behavioral traits: it explains the label resolution order ('for[id], ancestor LABEL, aria-labelledby, aria-label in that order'), value truncation ('truncated at 200 chars'), and hidden input handling ('excluded by default — set includeHidden:true if needed'). It could mention rate limits or error conditions but covers essential operational details.

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 efficiently structured with three sentences: first states purpose and return data, second provides usage context and sibling differentiation, third lists prerequisites and caveats. Every sentence adds value with zero wasted words, and key information 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?

For a tool with 6 parameters, no annotations, and no output schema, the description provides strong context about what the tool does, when to use it, and key behavioral details. It could benefit from explaining the return format more explicitly since there's no output schema, but it covers most essential aspects given the complexity.

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 the schema already documents all parameters thoroughly. The description adds minimal parameter-specific context beyond the schema, mentioning the includeHidden parameter's purpose ('to avoid CSRF-token / serialized-state clutter') but not significantly enhancing understanding of other parameters. Baseline 3 is appropriate when schema does heavy lifting.

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 explicitly states the tool's purpose: 'Inspect all form fields... and return their name, type, id, current value, hint text, disabled/readOnly state, and associated label text.' It specifies the exact verb ('inspect') and resource ('form fields'), and distinguishes it from sibling browser_fill_input by explaining its discovery role.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool: 'Use this before browser_fill_input to discover exact field selectors and avoid accidentally targeting the wrong input.' It also specifies prerequisites: 'Requires browser_connect (CDP active).' This clearly differentiates it from alternatives and establishes proper context.

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/Harusame64/desktop-touch-mcp'

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