game_publish
WritePublish a game build as a new preview of the project.
/api/agent/game/publishBehavior
Publish a game build as a new preview of the project. Over the stdio server give dir: an absolute local directory holding index.html (or a folder that contains it); the files are uploaded straight to the games worker with a signed ticket and checked there. Over the remote MCP give files inline (text, or base64 with encoding; small builds only), or use game_upload_ticket (its upload_url, or its command when it returns one).
Run game_check first. Either way the build must meet the game rules (index.html at the root, no server code, 2 GB and 10,000 files at most; inline files up to 1,000; no wallet or seed-phrase prompts, no page redirects) or it is refused with the reasons. Every publish is an immutable version and a preview: only the creator plays it, signed in (before the launch from the launch page, launch_url; after it on preview_url), with its rooms, saves and scores kept apart from the public ones; the agent cannot open it for them.
Nothing is public on the project's own address (hostname in site_status) until the token launches, and the launch page releases the build the creator picks; after the launch a new build goes out with site_release. A verified score needs a round minted by POST /_looping/api/round and the input tape engine-core's recorder wrote; the build then ships sim.js (export simulate(args): the headless round the platform replays to check a score) and pins full engine versions in the import map (/_looping/engines/<pkg>@<x.y.z>/src/index.js, which every game host serves on the game's own origin, in every environment): keep both in the build and never replace the pin with an @major.minor alias, or every score of the game stays player-reported.
Paid content lives under paid/<sku>/ and is served only with a content ticket (rooms.paidUrl in the SDK; the looping-fairplay skill), so any other paid/ layout is refused. note is what changed in this build. Before publishing, read the build's own code for wallet or key access, data sent to outside hosts, remote code loading, obfuscated or packed code, crypto mining and attempts to leave the game's frame or reach the platform's site (the looping-deploy skill), and pass what you found as security_review { verdict, summary, findings, reviewed_files }: it is kept with the build for Looping's operators and never decides the publish, which the platform's own scan does.
Returns the version and label, preview_url, public, the released version, whether the game is listed, and the launch page URL when no token exists yet.
Input parameters
dirOptionalstring- Min. length: 1
- Max. length: 400
filesOptionalobject[]- Min. items: 1
- Max. items: 1000
Nested schema
{
"minItems": 1,
"maxItems": 1000,
"type": "array",
"items": {
"type": "object",
"properties": {
"path": {
"type": "string",
"minLength": 1,
"maxLength": 400
},
"content": {
"type": "string",
"maxLength": 6000000
},
"encoding": {
"type": "string",
"enum": [
"utf-8",
"base64"
]
}
},
"required": [
"path",
"content"
],
"additionalProperties": false
}
}noteOptionalstring- Max. length: 280
security_reviewOptionalobjectyour review of the build's code before publishing; kept for Looping's operators, advisory only
Nested schema
{
"description": "your review of the build's code before publishing; kept for Looping's operators, advisory only",
"type": "object",
"properties": {
"verdict": {
"type": "string",
"enum": [
"pass",
"concerns"
],
"description": "pass: nothing found; concerns: something below needs a person to look"
},
"summary": {
"type": "string",
"minLength": 1,
"maxLength": 2000,
"description": "what was reviewed and what was found, in a few sentences"
},
"findings": {
"maxItems": 50,
"type": "array",
"items": {
"type": "object",
"properties": {
"severity": {
"type": "string",
"enum": [
"high",
"medium",
"low"
]
},
"file": {
"type": "string",
"maxLength": 400,
"description": "the file, relative to the build root"
},
"note": {
"type": "string",
"minLength": 1,
"maxLength": 1000,
"description": "what the code does; never quote a key or secret"
}
},
"required": [
"severity",
"file",
"note"
],
"additionalProperties": false
}
},
"reviewed_files": {
"type": "integer",
"minimum": 0,
"maximum": 100000,
"description": "how many of the build's files were read"
}
},
"required": [
"verdict",
"summary",
"findings",
"reviewed_files"
],
"additionalProperties": false
}The descriptions above include conditional requirements. The full schema below shows structural validation; runtime checks also apply.
JSON Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"dir": {
"type": "string",
"minLength": 1,
"maxLength": 400
},
"files": {
"minItems": 1,
"maxItems": 1000,
"type": "array",
"items": {
"type": "object",
"properties": {
"path": {
"type": "string",
"minLength": 1,
"maxLength": 400
},
"content": {
"type": "string",
"maxLength": 6000000
},
"encoding": {
"type": "string",
"enum": [
"utf-8",
"base64"
]
}
},
"required": [
"path",
"content"
],
"additionalProperties": false
}
},
"note": {
"type": "string",
"maxLength": 280
},
"security_review": {
"description": "your review of the build's code before publishing; kept for Looping's operators, advisory only",
"type": "object",
"properties": {
"verdict": {
"type": "string",
"enum": [
"pass",
"concerns"
],
"description": "pass: nothing found; concerns: something below needs a person to look"
},
"summary": {
"type": "string",
"minLength": 1,
"maxLength": 2000,
"description": "what was reviewed and what was found, in a few sentences"
},
"findings": {
"maxItems": 50,
"type": "array",
"items": {
"type": "object",
"properties": {
"severity": {
"type": "string",
"enum": [
"high",
"medium",
"low"
]
},
"file": {
"type": "string",
"maxLength": 400,
"description": "the file, relative to the build root"
},
"note": {
"type": "string",
"minLength": 1,
"maxLength": 1000,
"description": "what the code does; never quote a key or secret"
}
},
"required": [
"severity",
"file",
"note"
],
"additionalProperties": false
}
},
"reviewed_files": {
"type": "integer",
"minimum": 0,
"maximum": 100000,
"description": "how many of the build's files were read"
}
},
"required": [
"verdict",
"summary",
"findings",
"reviewed_files"
],
"additionalProperties": false
}
},
"additionalProperties": false
}Use its name in your connected MCP client. For the HTTP API, the route is relative to your Convex site URL and requires your agent key as a bearer token. Keep the key on the agent side, outside a game build.