Skip to main content
Glama
Wraith MCP Server

Wraith MCP Server

by YogevKr

batch

Runs several browser actions in one call, in order, and stops at the first failure. Use it to fill and submit forms or repeat a known flow across many items.

Instructions

Run several actions in one call, in order, and stop at the first one that fails. Use it for work whose steps you already know: fill the fields of a form and submit it, or repeat one flow for a list of items.

Each action is an object with tool and that tool's arguments, for example [{"tool": "click", "index": "New meeting"}, {"tool": "type_text", "index": "Title", "text": "Kickoff"}, {"tool": "select_option", "index": "Duration", "option": "45 minutes"}, {"tool": "click", "index": "Save"}, {"tool": "read"}]. Tools: navigate, click, double_click, click_at, click_frame, type_text, select_option, press_key, drag, scroll, wait_for, go_back, go_forward, read.

index is a number from a snapshot (valid until the page navigates) or the element's visible name. Use a name for an element that an earlier step of the batch creates or that is on the next page: a dialog's fields, a menu's entries, the row to open. A batch can thus cross dialogs and pages. read returns the page's text at that point (find limits it to passages); lines that an earlier read of the batch gave are left out.

The result has one line for each step with what it changed and the text it showed, then what differs from the page before the batch. From the command line each action is one quoted argument or one line on stdin: wraith call batch 'click "New meeting"' 'type_text Title Kickoff'.

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": "batch"
  }
}

Input Schema

NameRequiredDescriptionDefault
actionsYes
include_snapshotNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.29.0

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: ordering, stop-at-first-failure behaviour, index validity until navigation, the ability to cross dialogs and pages by name, read de-duplication across steps, and the shape of the per-step result. These are non-obvious traits an agent could not infer from the schema.

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?

Front-loaded with the one-sentence contract, then grouped into action format, index rules, result format, and CLI invocation. The worked example is dense but every clause carries information; nothing is redundant.

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 polymorphic batch executor this is close to complete: invocation, step semantics, indexing rules and failure behaviour are all covered, and an output schema exists so return values need not be restated. The only real hole is the unexplained include_snapshot flag.

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 0% and the actions items are untyped, so the description has to compensate — and it does, spelling out the {tool, arguments} object shape, the allowed tool values, and the index-versus-visible-name rule. It never mentions include_snapshot, however, so one of the two parameters remains undocumented everywhere.

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 opening sentence names a specific verb and resource ('Run several actions in one call') and adds precise semantics — in order, fail-fast. That distinguishes it cleanly from the single-step siblings such as click, type_text and read, which the description explicitly lists as batchable.

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?

'Use it for work whose steps you already know' plus two concrete scenarios (fill and submit a form, repeat a flow over a list) tells the agent when this beats issuing individual tool calls. What is missing is an explicit exclusion — e.g. that steps depending on earlier output should not be batched — which is only implied by 'steps you already know'.

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