Skip to main content
Glama

glass_set_value

Set a value on a single UI element using its id or a fresh target, then confirm the write applied. Use for one-step interactions where readback verification is needed.

Instructions

Set exactly one editable id or target with backend confirmation. A target resolves fresh and uniquely (10 seconds by default); IDs remain immediate. Writes directly or focuses/clears/types as supported, then reads back. Errors distinguish mismatch from unconfirmed writes; post-write uncertainty is terminal. Do not write again on uncertainty: observe where input landed before recovery. For 2+ known steps, use glass_do.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoLatest snapshot ID, exclusive with target.
textYesText, slider/spin number, toggle boolean (true/false/on/off/1/0), or case-insensitive combo option label. Toggle writes are idempotent; combos open and choose the option.
returnNonone (default): no observation; settle: text-only visual stability; snapshot: settle and refresh/fold the accessibility tree.
targetNo
max_nodesNo
timeout_msNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv1.8.0
    • addedInput schema / $defs
      Added value: +{
      +  "ActionScopeArgs": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "query": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "role": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "states": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": [
      +          "array",
      +          "null"
      +        ]
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "ActionTargetArgs": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "query": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "role": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "states": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": [
      +          "array",
      +          "null"
      +        ]
      +      },
      +      "within": {
      +        "anyOf": [
      +          {
      +            "$ref": "#/$defs/ActionScopeArgs"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      }
      +    },
      +    "type": "object"
      +  }
      +}
    • changedInput schema / properties / id / description
      Previous value: -"The element `#id` from `glass_a11y_snapshot`."New value: +"Latest snapshot ID, exclusive with target."
    • changedInput schema / properties / id / type
      Previous value: -"integer"New value: +[
      +  "integer",
      +  "null"
      +]
    • addedInput schema / properties / max_nodes
      Added value: +{
      +  "format": "uint32",
      +  "minimum": 0,
      +  "type": [
      +    "integer",
      +    "null"
      +  ]
      +}
    • changedInput schema / properties / return / description
      Previous value: -"Optional observe folded into the result: \"snapshot\" (wait for the UI to settle, then\nfold a fresh a11y tree, also refreshing the snapshot cache), \"settle\" (waits for visual\nstability and returns text-only metadata), or \"none\" (default)."New value: +"none (default): no observation; settle: text-only visual stability; snapshot: settle and refresh/fold the accessibility tree."
    • addedInput schema / properties / target
      Added value: +{
      +  "anyOf": [
      +    {
      +      "$ref": "#/$defs/ActionTargetArgs"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • changedInput schema / properties / text / description
      Previous value: -"The value to set. For a text field, the text. For a spin/slider, a number.\nFor a switch/checkbox/toggle, a boolean (`\"true\"`/`\"false\"`/`\"on\"`/`\"off\"`/\n`\"1\"`/`\"0\"`) — idempotent. For a dropdown/combo box, an option label\n(case-insensitive); glass opens it and picks that option."New value: +"Text, slider/spin number, toggle boolean (true/false/on/off/1/0), or case-insensitive combo option label. Toggle writes are idempotent; combos open and choose the option."
    • addedInput schema / properties / timeout_ms
      Added value: +{
      +  "format": "uint64",
      +  "maximum": 120000,
      +  "minimum": 0,
      +  "type": [
      +    "integer",
      +    "null"
      +  ]
      +}
    • changedInput schema / required
      Previous value: -[
      -  "id",
      -  "text"
      -]New value: +[
      +  "text"
      +]
  2. Changed1 schema field changedv1.5.1
    • changedInput schema / properties / return / description
      Previous value: -"Optional observe folded into the result: \"snapshot\" (wait for the UI to settle, then\nfold a fresh a11y tree, also refreshing the snapshot cache), \"settle\" (wait for the UI\nto stop changing, text-only), or \"none\" (default)."New value: +"Optional observe folded into the result: \"snapshot\" (wait for the UI to settle, then\nfold a fresh a11y tree, also refreshing the snapshot cache), \"settle\" (waits for visual\nstability and returns text-only metadata), or \"none\" (default)."
  3. Addedv1.2.0
  4. Removedv1.1.0
  5. Addedv1.0.2

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the minimal false hints, it discloses backend confirmation, fresh target resolution, immediate ID behavior, supported write modes, read-back behavior, and terminal post-write uncertainty. No contradiction with annotations.

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?

Every sentence carries operational weight, from the core contract to recovery guidance and the sibling reference. It is dense but not bloated, with the most important constraints 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?

It covers the tool's core behavior, error taxonomy, and recovery policy, making the mutation tool much safer to invoke. The main gap is the absence of exact output/error shape, which matters more given there is no output schema.

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?

The schema covers id, text, and return, but leaves target, max_nodes, and timeout_ms largely undocumented. The description adds value by explaining target resolution freshness/uniqueness and ID immediacy, though it does not clarify max_nodes or timeout_ms.

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 states a specific action ('Set...') with a bounded scope: exactly one editable id or target. It also distinguishes itself from the multi-step sibling by explicitly naming glass_do as the alternative.

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?

It explicitly says 'For 2+ known steps, use glass_do,' giving a clear routing rule. It also provides when-not-to guidance by warning not to write again on uncertainty and to observe first before recovery.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.