Skip to main content
Glama

script

Execute a chain of browser automation steps in a single request, with per-step authorization and audit. Reference earlier results to build complex sequences without separate calls.

Instructions

Run a sequence of tool calls in one request. Steps execute in order; each step is validated, authorized, and audited exactly as if called individually. Step arguments may reference a prior step's structured result: $prev.field for the previous step, $N.field for step N (1-indexed), with .0-style numeric segments indexing arrays (example: $prev.results.0.ref after find). Write $$ for a literal leading $. Only tools with structured results (find, tabs_context, tabs_create, navigate, wait_for) can be referenced. Steps may not include script itself. Use wait_for between navigate and reads on dynamic pages.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stepsYesOrdered tool calls to execute sequentially.
tabIdNoTab ID the steps run against. Steps inherit this tabId when their own args omit it. Use tabs_context first if you don't have a valid tab ID.
dry_runNoWhen true, run every step through the real governance decision (registry, schema, sacred, authorize) but do not dispatch. Each step reports would_allow or would_deny with the reason a live run would produce; no mutations, no step audit records.
onErrorNo"stop" (default) halts the chain on the first non-ok step; "continue" runs remaining steps. A held step always stops the chain regardless.
budget_msNoTotal wall-clock budget for the whole script in milliseconds. Lowers (never raises) the configured ceiling; remaining steps report not_run on exhaustion.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultsYes
summaryYes
provenanceNo
duration_msYes
Behavior4/5

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

With no annotations provided, the description carries the full burden and does well. It discloses that each step is 'validated, authorized, and audited exactly as if called individually,' explains the variable reference syntax, the literal '$' escape, and the restriction on referencing tools. It does not mention failure handling (e.g., onError behavior), but that detail is covered by the schema, and the description adds valuable behavioral nuance.

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 description is dense and information-packed without redundancy. The first sentence states the core purpose, and subsequent sentences add necessary details about syntax, limitations, and a practical usage tip. Every sentence contributes meaningful content, and it remains concise given the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is a complex meta-tool with five parameters and an output schema. The description explains the execution model, parameter reference syntax, tool restrictions, and includes a usage tip for dynamic pages. The schema covers parameter-level details, and the output schema covers return values, so the description is sufficiently complete for an agent to select and use the tool correctly.

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 100%, so the baseline is 3. The description adds significant value by giving concrete examples of the reference syntax (e.g., '$prev.results.0.ref after find') and the '$$' escape, which are not detailed in the schema parameter descriptions. It also clarifies which tools can be referenced, enhancing understanding beyond the schema alone.

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 description opens with 'Run a sequence of tool calls in one request,' a specific verb and object that clearly defines the tool's function. It goes beyond a simple statement by explaining sequential execution and explicitly prohibiting nesting script itself, which distinguishes it from single-action sibling tools like navigate or find.

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?

The description provides clear context on when to use the tool (for multi-step sequences) and includes a specific tip: 'Use wait_for between navigate and reads on dynamic pages.' It also states constraints like which tools can be referenced and that script cannot be nested. However, it does not explicitly contrast this tool with sibling alternatives such as browser_batch, so it falls short of a full 5.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sylin-org/ghostlight'

If you have feedback or need assistance with the MCP directory API, please join our Discord server