Skip to main content
Glama

sandbox_scene

Destructive

Act inside the page the person has open at any of the box's URLs (sceneUrl or a web service's url): runs JavaScript there and returns the result. That page renders on their own phone or laptop, so it is not on the box's virtual display and sandbox_shot/takeover input cannot reach it — this can. Use it to drive the feature while they watch, or to read what they are looking at. Fails with a clear message when nobody has any of those pages open.

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": {
      "id": "<id>",
      "js": "<js>"
    },
    "name": "sandbox_scene"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYes
jsYesJavaScript to run in the page the person has open (the most recently opened one if several are). The value of the last expression comes back (promises are awaited), so document.querySelector('#save').click() or location.pathname both work
timeoutSecNoHow long to wait for the page to answer; default 15

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already flag readOnlyHint=false, destructiveHint=true, openWorldHint=true, and the description adds genuinely non-obvious context: the target page renders on the person's own phone or laptop and is unreachable by the display-oriented siblings, which explains the open-world surface. It also documents the failure mode when no page is open. It does not warn that arbitrary JavaScript mutates a live page the user is watching with no undo, which is exactly the risk the destructiveHint implies.

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?

Four sentences, front-loaded with the action and scope, and every sentence carries information (target, why siblings can't reach it, use cases, failure mode). The em-dash clause in sentence two is slightly dense and could be split, but no sentence is padding.

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 three-parameter tool with no output schema, the definition covers target scope, return behavior ("returns the result," with the schema explaining the last-expression value and promise awaiting), timeout defaults, and the empty-state failure. The one meaningful omission is any statement about what happens to page state on a throwing script or on timeout, which matters given destructiveHint=true.

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 67%, and the description fills the main gap by framing the `id` parameter as identifying which of the box's URLs/pages (sceneUrl or a web service's url) is targeted. The `js` and `timeoutSec` parameters are well documented in the schema itself. It still doesn't clarify the exact accepted form of `id` (scene URL vs. service URL vs. identifier) beyond that framing.

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?

"Act inside the page the person has open at any of the box's URLs ... runs JavaScript there and returns the result" gives a specific verb (run JavaScript), a specific target (the user's live page, not the virtual display), and an explicit return. It also names the sibling tools (sandbox_shot, sandbox_takeover) that cannot reach that page, so an agent can separate it from them without opening a schema.

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 gives concrete use cases ("drive the feature while they watch, or read what they are looking at") and routes the agent away from sandbox_shot/takeover for the user's own device. It also states the precondition-failure case ("fails with a clear message when nobody has any of those pages open"). It stops short of a full when-not/what-to-use-instead rule for cases where the page is not open.

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.