Skip to main content
Glama

glass_set_value

Set an editable element's value by its accessibility snapshot id, supporting text, numbers, toggles, and dropdowns, with read-back confirmation.

Instructions

Set an editable element's value — pick the element's #id from glass_a11y_snapshot. Where the platform can write the value directly this is instant and takes no keystrokes; where it has to be typed, glass taps the element, clears it and types, then reads the element back to confirm — up to three accessibility reads, since a field may commit a frame or two later. Errors if the element isn't editable, if it changed since the snapshot (re-snapshot), if the element does not hold the requested value afterwards, or if the app exposes no accessibility tree. A separate error says the text WAS typed but the write could not be confirmed — the read-back failed, or could not tell which element now holds it. Do NOT write again on that one: the keystrokes already went out, and re-snapshotting is how you see where they landed. Optional return: "snapshot" settles the UI then folds a fresh a11y tree into the result (and refreshes the snapshot cache); "settle" waits for the UI to stop changing (text-only); omit or "none" for no observe (default).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe element `#id` from `glass_a11y_snapshot`.
textYesThe value to set. For a text field, the text. For a spin/slider, a number. For a switch/checkbox/toggle, a boolean (`"true"`/`"false"`/`"on"`/`"off"`/ `"1"`/`"0"`) — idempotent. For a dropdown/combo box, an option label (case-insensitive); glass opens it and picks that option.
returnNoOptional observe folded into the result: "snapshot" (wait for the UI to settle, then fold a fresh a11y tree, also refreshing the snapshot cache), "settle" (wait for the UI to stop changing, text-only), or "none" (default).
Behavior5/5

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

The description goes well beyond annotations (none provided), detailing instant vs typed paths, read-back confirmation up to three reads, specific error conditions, and the warning not to rewrite after an unconfirmed write. This gives the agent critical behavioral expectations.

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 dense but every sentence earns its place: purpose, behavior, failure modes, operational warning, and optional return behavior. It is front-loaded and organized.

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?

Despite no output schema or annotations, the description covers the tool's mechanism, error cases, retry guidance, and return options. It is sufficiently complete for the agent to select and invoke the tool correctly.

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%, so the baseline is 3. The description adds meaning by explaining the id source and elaborating the return parameter's 'snapshot' and 'settle' behaviors beyond the schema descriptions, which justifies a 4.

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 opening 'Set an editable element's value' states a clear verb and resource, and references picking the element's #id from glass_a11y_snapshot. This differentiates it from siblings like glass_type or glass_click.

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 clearly indicates this is for setting editable element values using a snapshot id, and contrasts direct writes with typed fallback. It doesn't explicitly name alternative tools or state when not to use it, but the usage context is unambiguous.

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/fixed-width/glass'

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