Skip to main content
Glama

execute

Runs JavaScript code or absolute local .js files in a fresh JsMacros context to control Minecraft, captures console output, and returns a task ID for long-running scripts readable via read_output.

Instructions

Run JS code OR an absolute local .js file in a fresh JsMacros context. Native JsMacros and installed mod Java APIs are available. console.log/print are captured. Returns early with task ID when still running; use read_output. This is GraalJS, not Node.js.

Input Schema

NameRequiredDescriptionDefault
codeNo
fileNo
wait_msNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

A4.1/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 substantial work: fresh context per run, native JsMacros and mod Java APIs available, console.log/print captured, and async early-return semantics with a task ID. It omits the security/permission implications of arbitrary code execution and error/exception behavior, which is the main remaining gap.

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 short sentences, front-loaded with what gets executed, followed by environment, output capture, and return semantics. The 'GraalJS, not Node.js' caveat is terse and prevents a real class of invocation errors, so every sentence earns its place.

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 no annotations mean the description is the only source of behavioral detail, and it covers execution environment and the early-return path well. However, for a three-parameter arbitrary-code-execution tool it leaves wait_ms semantics, code-vs-file precedence, and failure modes undocumented.

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 description coverage is 0%, and the description only adds meaning for two of the three params: `code` (JS source) and `file` (must be an absolute local .js path). It never explains whether code and file are mutually exclusive or which wins, and `wait_ms` — with a 0–10000 range and 1000 default — is not mentioned at all despite being the control that determines whether the call returns early.

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 two concrete input modes: run JS code or an absolute local .js file, executed in a fresh JsMacros context. It also disambiguates the runtime ('GraalJS, not Node.js') and points at the async sibling read_output, so an agent can tell exactly what this tool does and how it differs from read_output/stop.

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?

Explicitly routes the agent to read_output when the call returns early with a task ID, which is the key alternative-selection rule for this tool family. It does not state when to prefer inline `code` over `file`, nor when not to use the tool at all, so it stops short of full when/when-not guidance.

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

Deploy Server

Other Tools