Dea DardanicaDocumentation
Input and formsRead Markdown

batch

Use for already-known selectors/refs or repeated mechanical actions. A step acts inside an iframe with args.frame, like the single tools. Run a scripted sequence of steps in ONE call, optionally repeated — use this for mechanical loops with no decisions in them (scroll a timeline 20 times, fill-and-submit a known form, like every visible post) instead of paying a full round-trip per action. steps is an array of {tool, args}; allowed step tools: navigate, click, type_text, paste_text, press_key, blur, hover, select_option, fill_form, upload_file, scroll, wait_for, get_state, sleep({ms}). For different records use rows:[{field:"value"},...] with {{field}} placeholders in string args, instead of separate calls. A final read then runs only after the last row. times repeats the whole sequence (max 25; max 200 executed steps total); the placeholder {i} in any string arg becomes the 1-based iteration number, so selector '.post:nth-of-type({i}) button' addresses successive items. Stops at the first error unless continue_on_error. Returns a compact per-step log. One read_page, get_page_text, or inspect step may be LAST; its result is returned under read. Screenshots cannot be batched. Per-action page feedback is suppressed; use individual actions when intermediate confirmation matters.

Example#

Call this MCP tool with the argument object below. Replace illustrative IDs, selectors, local paths, and project URLs with values observed in your session.

json
{
  "steps": [
    {
      "tool": "scroll",
      "args": {
        "pixels": 600
      }
    },
    {
      "tool": "read_page"
    }
  ]
}

Usage notes#

Use batch only for known steps. Inner argument semantics, allowed read placement, rows/times exclusivity, and total action limits are validated separately from the JSON input shape.

Result#

Returns execution status, counts, compact step logs, failures, and an optional final read. Reads belong at the end; rows can make that read run only once.

Results arrive in MCP content blocks. Most structured results are JSON in text blocks; image tools can include image blocks. Handle errors and partial or truncated data. No formal output schema is declared for this tool.

Parameters#

batch — table 1
ParameterTypeRequiredDescription
stepsarray of objectYesSteps run in order, e.g. [{tool:'scroll',args:{pixels:800}},{tool:'sleep',args:{ms:400}}] minItems: 1; maxItems: 20
beforearray of objectNoOne-time setup steps before rows or times, e.g. click Start. Literal arguments; no placeholders or terminal reads. Counts toward 200 actions. Entire batch validated first; setup failure always stops. maxItems: 20
timesintegerNoRepeat identical steps (default 1, max 25); mutually exclusive with rows minimum: 1; maximum: 25
rowsarray of objectNoRun one template per record, substituting {{field}} in string args. Example: steps:[{tool:"type_text",args:{selector:"#name",text:"{{name}}"}}], rows:[{name:"Alex"},{name:"Sam"}]. Use instead of times. All rows validated before effects; max 200 actions. A final read step runs only after the last row. minItems: 1; maxItems: 25
continue_on_errorbooleanNoKeep going past failed steps (default false)
wait_forobjectNoFinal read completion condition, captured before the last click/navigation/Enter. For SPA filtering use {selector: observed results container, changed:true}; an existing selector alone is insufficient.
tabstringNoTab name or id in your workspace; does not change the visible tab. minLength: 1

Full input schema#

The schema includes nested shapes and constraints. Additional semantic constraints can apply at runtime; read the description and usage notes.

json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "steps": {
      "minItems": 1,
      "maxItems": 20,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "tool": {
            "type": "string",
            "enum": [
              "navigate",
              "click",
              "type_text",
              "paste_text",
              "press_key",
              "blur",
              "hover",
              "select_option",
              "fill_form",
              "upload_file",
              "scroll",
              "wait_for",
              "get_state",
              "sleep",
              "get_page_text",
              "inspect",
              "read_page"
            ]
          },
          "args": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "tool"
        ],
        "additionalProperties": false
      },
      "description": "Steps run in order, e.g. [{tool:'scroll',args:{pixels:800}},{tool:'sleep',args:{ms:400}}]"
    },
    "before": {
      "description": "One-time setup steps before rows or times, e.g. click Start. Literal arguments; no placeholders or terminal reads. Counts toward 200 actions. Entire batch validated first; setup failure always stops.",
      "maxItems": 20,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "tool": {
            "type": "string",
            "enum": [
              "navigate",
              "click",
              "type_text",
              "paste_text",
              "press_key",
              "blur",
              "hover",
              "select_option",
              "fill_form",
              "upload_file",
              "scroll",
              "wait_for",
              "get_state",
              "sleep",
              "get_page_text",
              "inspect",
              "read_page"
            ]
          },
          "args": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "tool"
        ],
        "additionalProperties": false
      }
    },
    "times": {
      "description": "Repeat identical steps (default 1, max 25); mutually exclusive with rows",
      "type": "integer",
      "minimum": 1,
      "maximum": 25
    },
    "rows": {
      "description": "Run one template per record, substituting {{field}} in string args. Example: steps:[{tool:\"type_text\",args:{selector:\"#name\",text:\"{{name}}\"}}], rows:[{name:\"Alex\"},{name:\"Sam\"}]. Use instead of times. All rows validated before effects; max 200 actions. A final read step runs only after the last row.",
      "minItems": 1,
      "maxItems": 25,
      "type": "array",
      "items": {
        "type": "object",
        "propertyNames": {
          "type": "string"
        },
        "additionalProperties": {
          "type": "string"
        }
      }
    },
    "continue_on_error": {
      "description": "Keep going past failed steps (default false)",
      "type": "boolean"
    },
    "wait_for": {
      "description": "Final read completion condition, captured before the last click/navigation/Enter. For SPA filtering use {selector: observed results container, changed:true}; an existing selector alone is insufficient.",
      "type": "object",
      "properties": {
        "selector": {
          "type": "string",
          "minLength": 1
        },
        "text": {
          "type": "string",
          "minLength": 1
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "changed": {
          "type": "boolean",
          "const": true
        },
        "timeout_ms": {
          "type": "integer",
          "minimum": 1,
          "maximum": 15000
        }
      },
      "additionalProperties": false
    },
    "tab": {
      "description": "Tab name or id in your workspace; does not change the visible tab.",
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "steps"
  ],
  "additionalProperties": false
}

Reference conventions · Agent operating guide · Troubleshooting