Host the game at a share link
publish_gameHost the game's files at a public share link, https://.play.multiplayeragent.com/ (the game's own origin; the slug comes from the game's name and never changes). The game needs an index.html at the root plus any JS/CSS/assets, paths relative to it. Send small text files (HTML, JS, CSS, JSON) inline as { path, content }. For images, audio, fonts, models and ANY file over ~50 KB, call create_upload first, PUT each file with curl, and pass { path, uploadId } here: the bytes never go through you. (Inline base64 with encoding: "base64" still works for a tiny binary.) The files must use THIS game's publishable key (it is how the server knows the build belongs to this game; a client wired to another game is refused). mode "replace" (the default) makes the files you send the whole game: anything not sent is removed. mode "patch" adds or replaces only the files you send and keeps the rest, and remove deletes paths: use it to fix one file without resending the art, or to put a big build up over several calls. Re-run after every change; the link stays the same. Limits on this studio's plan: 100 files and 5 MB per game, 25 MB across all its games. Give the user the url: anyone who opens it joins the same rooms. Nothing is listed publicly; only people with the link find it.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"files": "<files>"
},
"name": "publish_game"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| game | No | Which game to act on: its publishable key (pk_…) or its exact name. Defaults to the x-mp-game header, then your primary game. | |
| mode | No | 'replace' (default): these files become the whole game. 'patch': add or replace just these, keep everything else hosted. | |
| files | Yes | The files: in replace mode every file of the game, including index.html; in patch mode just the ones to add or replace. | |
| remove | No | Patch mode only: hosted paths to delete. |