Skip to main content
Glama

browser_batch

Run several page actions on one tab in a row, then get a fresh snapshot back — one call instead of one per step; worth it for a single action too. Steps aim with the numbers of one snapshot.

Instructions

Run several page actions on one tab in a row, then get a fresh snapshot back — one call instead of one per step; worth it for a single action too. Steps aim with the numbers of one snapshot. For something an earlier step makes appear (a suggestion list, a menu), wait for it with browser_wait forText, then aim with find instead of emsn: {"tool": "browser_click", "args": {"find": {"text": "Bluetooth headphones"}}}. Stops at the first failure, unless the step says onFail: skip (a banner that may not show). After a step the browser says changed the page, the later steps that aim by number are not run; waits and finds still are.

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": {
      "actions": "<actions>"
    },
    "name": "browser_batch"
  }
}

Input Schema

NameRequiredDescriptionDefault
tabIdNoTab to act on. Defaults to the foreground tab of that window.
actionsYes
snapshotNoThe snapshot after the steps. full (default): the whole of it. changes: only the lines new or changed (+) and gone (-) since snapshotId's snapshot, with the lines they sit in; the whole of it, saying why, when there is none to compare with (another page, no snapshotId) or the changes would be longer. none: no snapshot.
windowIdNoWindow to act on. Defaults to the frontmost window.
snapshotIdNoFrom the snapshot the numbers were read from; required when any step names an emsn (a step may carry its own in args instead).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.9.7
    • changedInput schema / properties / actions / items / properties / args / description
      Previous value: -"That tool's own arguments, without windowId/tabId."New value: +"That tool's own arguments, without windowId/tabId. In place of emsn, find {text, tag?, nth?}: the element showing that text (words, name, value or hint; the innermost, an exact match first) in a snapshot taken at that step, the screen and about 8000px around it. Several matching fail the step, listing them: add tag (BUTTON, A, INPUT...) or nth (from 1)."
    • addedInput schema / properties / actions / items / properties / onFail
      Added value: +{
      +  "description": "stop (default): end the batch at this step's failure. skip: note it and go on. Invalid arguments stop it either way.",
      +  "enum": [
      +    "stop",
      +    "skip"
      +  ],
      +  "type": "string"
      +}
    • removedInput schema / properties / actions / maxItems
      Removed value: -10
    • addedInput schema / properties / snapshot
      Added value: +{
      +  "description": "The snapshot after the steps. full (default): the whole of it. changes: only the lines new or changed (+) and gone (-) since snapshotId's snapshot, with the lines they sit in; the whole of it, saying why, when there is none to compare with (another page, no snapshotId) or the changes would be longer. none: no snapshot.",
      +  "enum": [
      +    "full",
      +    "changes",
      +    "none"
      +  ],
      +  "type": "string"
      +}
  2. First observedv0.1.0

TDQS

Score is being calculated.