Skip to main content
Glama

glass_set_value

Set an editable element's value directly using its accessibility ID, bypassing keystrokes. Supports text, numbers, booleans, and dropdown options.

Instructions

Set an editable element's value directly via accessibility (instant, no keystrokes) — pick the element's #id from glass_a11y_snapshot. Errors if the element isn't editable, if it changed since the snapshot (re-snapshot), or if the app exposes no accessibility tree. 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?

With no annotations, the description fully discloses behavioral traits: errors if element not editable, if changed since snapshot, or if no accessibility tree. It also explains the return modes (snapshot, settle, none) and their effects.

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 a single sentence that packs significant information, but its density slightly impacts readability. It could be organized into clearer segments, but remains efficient.

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 no output schema and three parameters, the description covers all essential aspects: purpose, prerequisites, error conditions, parameter behaviors, and return options. It is fully self-contained.

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?

Schema coverage is 100%, but the description adds rich meaning beyond the schema, explaining the text parameter's format for various element types (text, spin/slider, switch, dropdown) and the return parameter's options in detail.

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 tool sets an editable element's value directly via accessibility, distinguishes from keystroke-based methods, and specifies picking the element's id from glass_a11y_snapshot. It also lists error conditions, providing a specific verb and resource.

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 explains when to use the tool (instant, no keystrokes) and prerequisites (id from snapshot). It provides guidance on the optional return parameter. However, it does not explicitly exclude use cases or compare with siblings like glass_type.

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