Skip to main content
Glama

Run Creator API JavaScript

creator_exec
Destructive

Runs JavaScript against the persistent Creator API document (code mode): build, inspect, preview and export are all done through this one call. Every successful mutation commits before the tool returns; any thrown error, including a timeout, rolls back the whole script and leaves the document unchanged. Returns the script's return value as result, logs, a warnings array (unit and range lints), the new revision, any outputs a render or export queued, and attaches PNGs from renderFilmstrip/render as images. Key parameters: code (the script), documentId (default "default"), timeoutMs (default 5000, max 30000). See the server instructions for units and the invariants, and creator_docs (lookup/query/topic) or creator.help(name) for anything not covered there.

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": "creator_exec"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesJavaScript source; creator, PropertyType, params, ctx, dump, files are in scope. See the server instructions for units and the invariants.
noteNoOne line for the document's history; default: the script's leading // comment.
paramsNo
timeoutMsNoWall-clock budget in milliseconds (default 5000, max 30000).
documentIdNoDefault "default"; use another id for a separate document.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

It provides extremely rich behavioral detail beyond the annotations, specifying that mutations commit immediately upon success and scripts roll back entirely upon failure. Furthermore, it lists every single return variable (`result`, `logs`, `revision`, etc.).

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?

Despite its complexity, the description is highly structured and prioritizes essential operational information first. It uses concise language to convey highly technical and critical execution behaviors.

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?

Given the complexity of running stateful JavaScript code, this definition is exceptionally complete. It covers execution logic, failure modes, return structure, and parameter constraints.

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?

The description adds semantic value by specifying that certain objects like `creator`, `PropertyType`, and `ctx` are in scope for the `code` parameter. It also details the constraints and default values of the `timeoutMs` parameter.

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 clearly defines the tool's function as running JavaScript against the Creator API document. It distinguishes itself as the execution engine, implicitly differentiating it from static, document-management siblings.

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?

It clearly defines the use case (build, inspect, preview, export) and the operational context (code mode). While it doesn't explicitly exclude other siblings, the focus on JavaScript execution provides strong usage context.

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.