Skip to main content
Glama

ui_set_checked

ui_set_checked

Sets the checkbox or radio button matching a selector to checked or unchecked, idempotently, so UI tests can control form state reliably.

Instructions

Set the single checkbox or radio button matching the selector to checked or unchecked. Idempotent: already in that state is fine. A radio cannot be unchecked directly. Use the selector from ui_get_page_state. Selectors containing "nth=" are positional: call ui_get_page_state again after the page changes before reusing them.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "selector": "<selector>",
      "checked": "<checked>"
    },
    "name": "ui_set_checked"
  }
}

Input Schema

NameRequiredDescriptionDefault
checkedYestrue to check, false to uncheck
selectorYesCSS selector, or the `selector` value of an element from ui_get_page_state, passed unchanged
session_idNoWhich open session to act on, as returned by ui_start_session. Optional with one open session; required when several are open.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations supplied, the description carries the whole burden and does well: it declares idempotency ('already in that state is fine'), documents the radio uncheck limitation, and flags the staleness hazard of positional selectors. It remains silent on error behavior when the selector matches nothing or multiple elements, and on whether the tool waits or scrolls, which are meaningful gaps for a browser automation action.

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?

Four short sentences, front-loaded with purpose followed by the three practical caveats. Every sentence adds information an agent would otherwise have to discover by trial; nothing is redundant with the schema or restates the tool name.

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 three-parameter mutation tool with no annotations and no output schema, the description covers purpose, idempotency, a key platform constraint, and selector lifetime. The remaining gap is failure semantics: what happens on no-match, multi-match, or a disabled input.

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 a baseline of 3 applies. The description earns above that by adding semantics the schema lacks: the `nth=` positional-selector caveat and the constraint that a radio's `checked` cannot be set to false. The `session_id` parameter is left entirely to the schema, which is acceptable given its full description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a precise verb and resource: 'Set the single checkbox or radio button matching the selector to checked or unchecked.' The scope is narrowed to checkbox and radio inputs only, which distinguishes it from general interaction tools. It does not, however, differentiate itself from the sibling ui_check, leaving the agent to guess which of the two is appropriate.

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?

Gives concrete operational guidance: source the `selector` from ui_get_page_state, treat `nth=` selectors as positional, and re-fetch page state after navigation before reuse. It also warns that a radio cannot be unchecked directly. What's missing is explicit routing versus ui_check or ui_click, so an agent still has no stated rule for choosing between them.

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