Skip to main content
Glama

Execute JavaScript in Blockbench

bb_execute_js

Run arbitrary async JavaScript inside Blockbench to access all globals, Node modules, and an injected api helper when structured tools cannot cover a task.

Instructions

Run arbitrary async JavaScript inside Blockbench with full access to every global (Project, Cube, Group, Mesh, Texture, Canvas, Codecs, Formats, Modes, Undo, Outliner, Preview, Menu, Action, BarItems, Plugins, StateMemory, ...) and the Node modules a plugin may use. Use this for anything the structured tools do not cover. The code may use await and must return a value; console output is captured and returned. An api argument is injected with helpers: api.find(ref), api.findAll(refs), api.textures(), api.animations(), api.sleep(ms), api.readFile(path), api.writeFile(path,text), api.toBase64(bytes), api.fromBase64(b64), api.toast(text).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesJavaScript source. May use await. The value of the last expression / an explicit return is returned.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.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 behavioral burden and does well: it discloses async execution, full global access, Node module availability, mandatory return values, console capture, and injected api helpers. It still omits details such as sandboxing, error handling, and side-effect persistence.

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?

The description is front-loaded with purpose and usage before moving into behavioral details and the api helper list. It is appropriately sized for a powerful, complex tool, though the helper enumeration is dense.

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?

Given the high-complexity execution tool, no annotations, and no output schema, the description is largely complete: it explains what the code can access, how return values work, and how console output is handled. It could still say more about error behavior or execution 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?

Schema coverage is 100% for the single code parameter, so the schema already explains the parameter. The description adds meaningful context beyond the schema by describing the injected api helpers and the return-value behavior.

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 states a specific verb and resource: run arbitrary async JavaScript inside Blockbench. It explicitly names the tool as the escape hatch for anything the structured tools do not cover, which clearly distinguishes it from its many 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 gives clear usage context: use this for anything the structured tools do not cover. This implicitly says when not to use it, but it does not name specific sibling alternatives or provide more detailed routing conditions.

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