spawn_exec
Query live game room data by executing read-only JavaScript snippets. Safely inspect objects without writing, enabling debugging and analysis.
Instructions
Run a read-only JavaScript snippet against the live room (e.g. query objects). Pushing is the only write path.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| script | Yes | JS to eval in the live room, e.g. return api.query({}).slice(0,50).map(o => ({id:o.id, pos:o.feetPosition, tags:o.tags})) | |
| projectDir | No | Absolute path to the Spawn game project (game.json / .env). Defaults to SPAWN_PROJECT_DIR or the MCP process cwd. |