Skip to main content
Glama
sosadly
by sosadly

execute_script

Perform unsupported Blockbench operations by running JavaScript code directly in the renderer, with full access to all Blockbench globals and objects.

Instructions

Run arbitrary JavaScript inside Blockbench's renderer for anything not covered by a dedicated tool. The code has access to all Blockbench globals (Project, Cube, Group, Texture, Animation, Undo, Canvas, Outliner, Format, Formats, ...) and receives a params object. Return a JSON-serializable value. Use sparingly; prefer dedicated tools.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesFunction body. Example: "return Cube.all.map(c => c.name)". Wrap edits in Undo.initEdit/finishEdit and call Canvas.updateAll() after geometry changes.
paramsNoOptional object passed in as `params`.
Behavior4/5

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

With no annotations, the description fully shoulders the burden. It discloses that the code has access to all Blockbench globals, receives a `params` object, and must return JSON-serializable values. It also provides a critical usage hint about wrapping edits. It does not mention error handling or security, but is otherwise transparent.

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?

The description is three sentences, each adding crucial information: purpose, capabilities, and usage warning. It is front-loaded with the primary action and avoids redundancy.

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 tool's complexity (arbitrary script execution), the description covers the key aspects: what it runs, environment, input, output, and fallback nature. It omits details like error behavior or performance, but is complete enough for an agent to decide appropriately.

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 both parameters. The description adds value beyond the schema by providing usage tips for the 'code' parameter (e.g., wrap edits in Undo.initEdit/finishEdit) and clarifying that 'params' is optional and passed as an object.

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 states the tool executes arbitrary JavaScript inside Blockbench's renderer for anything not covered by dedicated tools. It specifies the verb 'run', resource 'arbitrary JavaScript', and distinguishes from siblings by framing it as a fallback.

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?

The description explicitly says 'Use sparingly; prefer dedicated tools', providing clear when-to-use and when-not-to-use guidance. It also implies it's for edge cases not handled by other tools.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sosadly/blockbench-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server