Skip to main content
Glama

run_script

Execute isolated JavaScript against the Chorono scene API to create or edit animation data atomically. Use dryRun to preview changes and apply a returned plan without re-running code.

Instructions

Execute synchronous JavaScript in isolated QuickJS. Only scene API is available; no Node, DOM, fetch, imports or filesystem. All edits are atomic. dryRun returns a planId which apply_script_plan commits without rerunning code.

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

Input Schema

NameRequiredDescriptionDefault
codeYes
dryRunNo
requestIdNo
sessionIdNo
expectedRevisionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations only supply readOnlyHint=false and openWorldHint=false; the description adds substantial context beyond them – synchronous execution, sandbox limits (no Node, DOM, fetch, imports, filesystem), atomicity of edits, and the commit model. It still omits error/lifetime behavior of a planId and the concurrency meaning of expectedRevision.

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?

Four tight sentences, front-loaded with what runs and where, then constraints, then the dryRun workflow. Nothing is padded or repeated from the schema.

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?

No output schema and only two annotation hints, so the description should do more: what the code returns, whether dryRun plans expire, and how expectedRevision interacts with atomic writes are all missing. The sandbox and atomicity disclosure does cover the highest-risk unknowns.

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 description coverage is 0% across five parameters, so the description carries the burden, and it only explains dryRun. code, requestId, sessionId, and especially expectedRevision (likely an optimistic-concurrency guard tied to the atomicity claim) are left undefined in both places.

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?

States a specific verb and resource (execute synchronous JavaScript) plus the sandbox runtime (isolated QuickJS), which no sibling offers. It also distinguishes itself from apply_script_plan by explaining the dryRun/planId handoff, so an agent can separate the two 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?

Gives a clear workflow rule: use dryRun to get a planId, then apply_script_plan commits it without re-running code. It does not say when to prefer batch_actions or the granular layer tools over scripting, so the alternative selection is left implicit.

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