Skip to main content
Glama

unity_export

Export the open page's three.js scene at its current frame as a Unity 6 project with GLB assets, scene-building scripts, GameState, and a PORTING.md guide for manual gameplay porting.

Instructions

Writes the open page's three.js scene, at the frame it is on, as a Unity 6 project: the GLB (three's GLTFExporter: meshes, hierarchy, names, PBR materials and textures, lights, animations, skins, instancing, the camera), glTFast as its importer, an editor script that builds the Unity scene from it on the first open (hidden objects, background, fog, ambient light), GameState.cs from __game.observe(), and PORTING.md: what does not carry over (custom shaders, sprites, compressed and canvas textures, environment maps; named in the reply) and what to port by hand (game loop, input, physics, UI, sound). Gameplay code is not converted. The GLB is loaded back in the page and counted; Unity is not run.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "unity_export"
  }
}

Input Schema

NameRequiredDescriptionDefault
outNoThe Unity project's folder, relative to the open project's folder (paprika3d/unity/<Name> by default); exporting again replaces the GLB and scripts and keeps the rest.
gameNoThe name the game was opened under with the `open` tool, to act on ("main" by default; a subagent uses its own).
nameNoThe Unity asset folder and scene name (describe().name, or the project folder's, by default).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.5

TDQS

A3.9/5.0
Behavior4/5

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

With readOnlyHint=false and openWorldHint=true already supplied, the description still adds real value: it discloses that gameplay code is not converted, that Unity is never executed, that the GLB is reloaded and verified in-page, and that re-exporting replaces the GLB and scripts while keeping the rest. That last point is critical destructive-behavior context an agent could not get from annotations. It stops short of describing the reply's structure or any failure modes.

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 key point (three.js scene → Unity 6 project) is front-loaded, and each clause carries distinct information about deliverables or limitations. However, the entire definition is one sprawling sentence with a long embedded parenthetical list, which makes it harder to scan than a few short sentences would be.

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 a complex, multi-artifact export tool with three well-documented optional parameters and no output schema, the description covers inputs, deliverables, fidelity limits, and verification adequately. It is slightly thin on what the reply itself contains beyond "named in the reply" for unsupported features, which matters when no output schema exists.

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 100%, so `out`, `game`, and `name` are already fully documented including their defaults. The description adds only tangential context (the __game.observe() and describe().name sources for defaults) rather than new semantics, so the baseline 3 applies.

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?

"Writes the open page's three.js scene, at the frame it is on, as a Unity 6 project" gives a precise verb, resource, and output artifact. It then enumerates exactly what is packaged (GLB contents, glTFast importer, editor script, GameState.cs, PORTING.md), leaving no ambiguity about what the tool produces versus other siblings.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: an agent infers it should call this when it wants a Unity project from the current scene. There is no explicit when-to-use / when-not guidance and no comparison to a plausible alternative such as `publish`, so the agent must reason about the boundary itself.

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