Skip to main content
Glama

Script for the next browser step

page_action
Read-onlyIdempotent

Generates ready-made browser JavaScript for the next bus-booking step on redBus or MakeMyTrip, then indicates whether to read the page result or click the marked element.

Instructions

Get a ready-made browser script for the next booking step (redBus, MakeMyTrip).

Run the returned JavaScript in the user's open tab (your browser's run-JavaScript tool), then do what the reply says: usually call read_page with the result, or click the element it marked. Saves you writing page code. Never use it to type personal details or payment data.

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": {
      "action": "<action>"
    },
    "name": "page_action"
  }
}

Input Schema

NameRequiredDescriptionDefault
siteNoredBus or MakeMyTrip (needed for every action but capture).
seatsNoselect_seats on redBus: seat numbers, e.g. ['3U'].
actionYescapture: read the current page (then call read_page). open_bus: open one bus's seat map. select_seats: click seats. choose_points: pick boarding and drop points. decline_addons: say no to every paid extra. continue: the site's next-step button.
boardingNochoose_points: the boarding point's number from read_page, or its name.
droppingNochoose_points: the drop point's number from read_page, or its name.
operatorNoopen_bus: operator name as shown.
departureNoopen_bus: departure time as shown, HH:MM.
seat_indexesNoselect_seats on MakeMyTrip: the click numbers read_page listed for the chosen seats.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations declare readOnlyHint=true, idempotentHint=true and destructiveHint=false, and the description is consistent with that: the tool returns a script rather than acting itself. Beyond the annotations it discloses the key runtime contract — the returned code must be executed in the user's tab and its reply dictates the next step — plus a safety constraint on personal/payment data. The format of that reply is only loosely sketched.

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

Conciseness4/5

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

Three short paragraphs: purpose, execution workflow, safety limit, with the purpose front-loaded. Every sentence carries information, though the follow-up instructions are slightly compressed where more precision would help.

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?

With 8 params all documented and no output schema, the description covers the essential loop: request a script, execute it, act on the reply. What is thin is the shape of the returned script/reply itself, which the agent must interpret at runtime.

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

Parameters3/5

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

Schema description coverage is 100%, with per-action parameter explanations already in the schema, so the baseline of 3 applies. The description adds little parameter-level detail beyond reinforcing the action-driven workflow and the payment-data restriction.

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?

States a concrete verb and resource ('Get a ready-made browser script for the next booking step') and scopes it to redBus and MakeMyTrip. It is clearly distinct from siblings such as read_page or explain_seat_map, though it does not name those siblings to sharpen the boundary explicitly.

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?

Gives the operating procedure (run the returned JavaScript in the open tab, then follow the reply, usually calling read_page or clicking the marked element) and an explicit prohibition against typing personal or payment data. It stops short of stating when a plain read_page or search call should be preferred over requesting a script.

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