Skip to main content
Glama

dimension_run

Execute custom JavaScript inside Adobe Dimension to control scenes, materials, cameras, and actions when built-in tools lack coverage; supports async/await and returning results.

Instructions

Run JavaScript inside Dimension for anything the other tools do not cover (full control). async/await is allowed; return a value to see it. Helpers on window.__dmcp (alias d): d.app (all controllers: sceneGraphController, materialController, cameraController, lightSetController, environmentController, renderController, documentController, matchImageController, assetController, ...), d.dispatch(ACTION_TYPE, data), d.actionTypes(filter), d.methodsOf(obj), d.controllers(), d.tree(), d.findItem(pathOrLabel), d.select(paths), d.cache().fetch(nodePath) (node.properties[name].getValue/setValue), d.materialModel(path), d.setNodeProperty(path, name, value), d.sleep(ms), d.toJSON(x). Use dimension_source to learn how a feature is implemented before calling it.

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

Input Schema

NameRequiredDescriptionDefault
codeYes
timeout_msNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose key behavior: async/await is permitted, a returned value is surfaced, and the execution environment exposes window.__dmcp with a documented helper API including mutators like d.setNodeProperty and d.select. It does not state that arbitrary code can destructively alter the document, whether changes are undoable, what the sandbox boundaries are, or what happens on error/timeout.

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?

Purpose and the critical "return a value to see it" fact are front-loaded before the API enumeration, which is dense but earns its place as an at-a-glance reference. The trailing "..." in the controller list and the long inline helper chain make it slightly wall-of-text-like.

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 an unannotated, no-output-schema, arbitrary-execution tool, the description supplies an unusually complete picture: environment, helper API, return behavior, and the cross-tool workflow with dimension_source. The remaining gap is the risk profile — no warning that calls can mutate or break scene state, and no timeout/error behavior.

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 0%, so the description must compensate. It explains `code` well (return-value semantics, async/await, helper surface) but never mentions `timeout_ms` — its default, units, or what occurs when it elapses — leaving one of two parameters semantically undocumented.

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 ("Run JavaScript inside Dimension") and immediately frames the scope as the escape hatch for "anything the other tools do not cover (full control)", which separates it from the dedicated dimension_* siblings.

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

Usage Guidelines5/5

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

Gives an explicit selection rule (use only when no other tool covers the need) plus a concrete prerequisite workflow: "Use dimension_source to learn how a feature is implemented before calling it." The alternative and the condition that selects it are both named, not left to inference.

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