Skip to main content
Glama

browser_form

Inspect form fields within a CSS container to retrieve field attributes including name, type, id, value, and label. Use this tool to discover exact selectors before filling forms, avoiding accidental targeting of wrong inputs.

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 to discover exact field selectors and avoid accidentally targeting the wrong input (e.g. a global search bar). Caveats: Requires browser_open (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_open. Omit to use the first page tab.
portNoChrome/Edge CDP remote debugging port.
includeContextNoWhen true, append activeTab and readyState context to the response.
includeNoOptional response-shape opt-in. `['envelope']` returns the self-documenting envelope (`_version` / `data` / `as_of` / `confidence`). `['raw']` forces raw shape (overrides DESKTOP_TOUCH_ENVELOPE=1 server default). Default behaviour is raw shape (compat with existing clients).
Behavior4/5

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

With no annotations, the description fully bears the burden. It discloses that browser_open must be active (CDP), hidden inputs are excluded by default, value text is truncated at 200 chars, and the specific fields returned. It does not mention side effects, but as a read-only operation, this is acceptable. Some mention of error behavior or timeout would improve transparency.

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 dense but well-structured: first sentence states purpose, second gives usage guideline, third includes caveats. It is not overly verbose, though the list of returned fields could be slightly trimmed. Overall, every sentence adds value.

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 tool's complexity (browser interaction, multiple parameters, no output schema), the description covers prerequisites (browser_open), default behavior, return fields, and sibling relationship. It lacks explicit response format details but lists the fields, which is sufficient for an agent to decide and invoke.

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 100%, so baseline is 3. However, the description adds extra context for key parameters like 'selector' with example CSS selectors, and 'includeHidden' explaining why hidden inputs are excluded by default (CSRF-token clutter). This goes beyond the schema and provides meaningful semantics.

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 verb 'Inspect' and specifies the resource: all form fields within a container. It also distinguishes itself from sibling tool browser_fill by advising use before filling. The verb+resource is specific and unambiguous.

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 explicitly says 'Use this before browser_fill to discover exact field selectors and avoid accidentally targeting the wrong input.' This gives clear context and usage guidance. It also mentions caveats like requiring browser_open and hidden input exclusion. However, it does not explicitly state when not to use it, but the guidance is strong enough.

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