Skip to main content
Glama

Act in a browser session

writ_browser_act
Destructive

Runs one batch of actions on an open session and returns the fresh page. Each action is an object, e.g. {"action":"click","selector":"#go"}. DRIVE: navigate, click, fill, type_text, select, check, hover, submit, press_key, scroll, back, wait, wait_for. SEE: query_dom, find_text, read_text, count, get_attributes, inspect, list_candidates, get_dom, get_screenshot. NETWORK: capture_network, get_request, rotate_exit. CODE: evaluate_js, search_scripts, read_script. RECORD: extract {variable,script}, api_call (a flow is built step by step with writ_browser_compose add_flow_step), login_post, probe_write, confirm_write. 2FA: twofa {challenge_method}. A value written {{name}} with its real value in inputs becomes a workflow input. Each action's arguments: the session's start answer, or writ_help('writ_browser_act').

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

Input Schema

NameRequiredDescriptionDefault
inputsNo
actionsYesOrdered action objects, e.g. [{"action":"click","selector":"#login"}].
max_charsNoClip of the returned page (default 40000).
session_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • removedInput schema / properties / inputs / description
      Removed value: -"Values held server-side for {{placeholder}} substitution, e.g. {\"city\":\"Paris\"}. Secrets here or on a fill's data_key stay out of the recorded steps."
    • changedInput schema / properties / max_chars / description
      Previous value: -"Clip of the returned page_dom / page_text (default 40000, ≤200000). A get_dom probe on a real app is 500KB; evaluate_js / inspect / read_text return just the target."New value: +"Clip of the returned page (default 40000)."
    • removedInput schema / properties / session_id / description
      Removed value: -"Session id from the start tool."
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructive=true, openWorld=true and non-idempotent, so the safety profile is covered; the description adds real behavioral context beyond that — recording actions (probe_write/confirm_write/extract), 2FA challenge handling, and that {{name}} placeholders become workflow inputs. It does not say what happens on partial batch failure or whether state persists after the call.

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?

The purpose is front-loaded in sentence one, then the remaining space is spent on the action vocabulary that an agent cannot call the tool without. Labeled categories (DRIVE/SEE/NETWORK/CODE/RECORD/2FA) impose structure on what could have been an unstructured list; no sentence is filler.

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 tool with no output schema, the definition covers the return value (fresh page, clipped by max_chars) and points to writ_help for the long tail of per-action arguments. The only gap is failure/partial-completion behavior for a destructive batch.

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?

With only 50% schema coverage, the description does heavy lifting: it enumerates valid action names and shows the object shape, and it explains that a {{name}} placeholder paired with a real value in the `inputs` map becomes a workflow input — meaning for a parameter the schema does not document at all. It leaves session_id unexplained and defers the full per-action argument list to writ_help.

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 first sentence gives a specific verb and resource — runs one batch of actions against an open session and returns the fresh page — which is exactly what distinguishes it from siblings like writ_browser_compose or writ_browser_sessions. The action-category lists make the scope concrete rather than vague.

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?

It routes the agent by intent: use the DRIVE/SEE/NETWORK/CODE/RECORD groups for different goals, and explicitly notes that a flow is built step by step via writ_browser_compose add_flow_step. It never states when NOT to use this tool versus, say, writ_browser_network or writ_browser_context, so the exclusion side is missing.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.