Skip to main content
Glama
TestingBot MCP Server

TestingBot MCP Server

Official

tb_executeScript

Run a JavaScript snippet in the active browser page and return its value. Pass arguments positionally and use return to send results back to your agent.

Instructions

Execute a JavaScript snippet in the active page and return its result. The script body is wrapped as a function — use return to send a value back. Args are passed positionally via arguments[0], arguments[1], ...

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": {
      "sessionId": "<sessionId>",
      "script": "<script>"
    },
    "name": "tb_executeScript"
  }
}

Input Schema

NameRequiredDescriptionDefault
argsNoPositional arguments accessible as arguments[N]
scriptYesJS body, e.g. 'return document.title'
sessionIdYesSession ID from tb_openBrowser

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.0

TDQS

B3.3/5.0
Behavior2/5

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

With no annotations at all, the description carries the full behavioral burden. It usefully discloses the function-wrapping mechanism and the return mechanism, which is real added context, but says nothing about side effects (the snippet can mutate the page freely), sandbox or permission limits, error/timeout behavior, or whether it waits for load. For arbitrary code execution with zero annotation coverage, that is a substantial gap.

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?

Three short sentences, front-loaded with the action, then the two non-obvious mechanics (function wrapping, return, positional args). No filler or repetition.

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

Completeness3/5

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

For a 3-parameter tool with no annotations and no output schema, the description explains the invocation contract well but leaves the risk profile and failure modes unexplained. An agent can call it correctly, but cannot judge the consequences of doing so.

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 coverage is 100%, so all three parameters are documented in the schema itself, including the arguments[N] mapping. The description restates the positional argument convention and clarifies that `return` is required to send a value back, which is a small genuine addition but largely duplicates the schema's script example.

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 specific verb and resource: execute a JavaScript snippet in the active page and return its result. This clearly distinguishes it from the specific-action siblings like tb_click, tb_getText, and tb_snapshot, since this is an arbitrary-code escape hatch. It stops short of an explicit differentiation sentence but the purpose is unambiguous.

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: an agent can infer this is the fallback when no dedicated tool covers the need, but the description never says when to prefer it over tb_click/tb_getText or when not to use it. No prerequisites or constraints on the active page state are mentioned.

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