Skip to main content
Glama

run_script

Execute a saved script in a shared browser tab and return its result, enabling agents to automate page actions and retrieve output.

Instructions

Run a saved script in a shared tab and return its result.

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

Input Schema

NameRequiredDescriptionDefault
tabNoTab handle from list_tabs, e.g. "chrome:812". Optional when only one tab is shared.
nameYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

Annotations are empty, so the description carries the full burden and does little: it does not disclose that this executes arbitrary code with page privileges in a live browser tab, whether execution is awaited, what happens on script error or timeout, or how "its result" is serialized. Only the high-level existence of a return value is mentioned.

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?

A single front-loaded sentence with no wasted words, though its terseness shades into under-specification given the tool's execution semantics.

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

Completeness2/5

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

For a code-execution tool with no annotations, no output schema, and an undocumented required parameter, the definition is too thin — it omits execution/error semantics, the meaning of `name`, and the shape of the returned result, all of which the agent needs to call it correctly.

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

Parameters2/5

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

Schema coverage is 50%: `tab` is documented in the schema (handle from list_tabs, optional for a single shared tab) but the required `name` parameter has no schema description at all. The description does not compensate — it never says whether `name` is a script identifier, a path, or a display name, nor how it relates to list_scripts.

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+resource pair ("Run a saved script") with scope ("in a shared tab") and return behavior, which implicitly separates it from run_js by requiring a previously saved script. It stops short of naming any sibling explicitly, so the agent must infer the boundary from the word "saved".

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied via the qualifier "saved" — the script must already exist (presumably from save_script/list_scripts). There is no statement of when to prefer this over run_js or run_watcher, and no exclusions or prerequisites about sharing a tab are spelled out.

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