Skip to main content
Glama

Select Option

select_option

Select one or more options in a element on a Playwright-controlled page using a CSS, text, role, test ID, XPath, or label selector.

Instructions

Select options in a element.

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>",
      "values": "<values>"
    },
    "name": "select_option"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageIdNoPage id. Defaults to the active page.
valuesYes
selectorYesCSS selector, text=..., role=button[name="Save"], testid=..., xpath=..., or label=...
timeoutMsNoOperation timeout in milliseconds.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.5/5.0
Behavior1/5

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

With no annotations supplied, the description carries the full behavioral burden and does not meet it. It says nothing about whether the supplied values replace existing selections or append to them, whether values match by option value attribute or visible label, what happens if a value isn't found or the element isn't a select, or whether the call waits for options to populate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The single sentence is tight and front-loaded with no filler, so it is concise. However, that brevity comes at the cost of under-specification rather than efficiency – there is essentially no structure beyond the one clause.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a four-parameter, state-mutating browser tool with no annotations and no output schema, the definition is thin. The schema covers most parameter meaning, but the missing behavioral details (replace vs. append semantics, failure modes, matching strategy) are exactly what an agent needs before invoking it on a live page.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 75%, so the schema already documents pageId, selector, and timeoutMs. The description adds no meaning to the required `values` array (the one undocumented-ish parameter) – it does not say whether entries are option values, labels, or indices, nor how multiple entries behave in a single-select context.

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?

The description names a concrete verb ("select") and a concrete target ("options in a <select> element"), which is specific enough that an agent can distinguish it from generic click/fill-style tools. It stops short of explicitly contrasting itself with siblings like set_checked or press, but the <select>-element scoping does most of the disambiguating work.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use guidance: no mention of how this differs from set_checked, fill, or click, no indication that the target must actually be a <select> element, and no advice on what to do for multi-select versus single-select cases. The agent must infer all selection strategy from the sibling list.

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