glitchless-mcp 0.16.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +2 -2
- package/src/context.js +2 -2
- package/src/tools/analytics.js +1 -1
- package/src/tools/core.js +3 -2
- package/src/tools/dashboard.js +3 -3
- package/src/tools/playtest.js +11 -8
package/README.md
CHANGED
|
@@ -112,7 +112,7 @@ above go in its environment.
|
|
|
112
112
|
| `glitchless_match` | A multiplayer game's matches (the worst by lag or disconnects on request), or one match from every side, 30 seconds at a time: each player's ping, frame time and outcome, the server's ticks, and whether the whole lobby lagged at once (the server) or one player did (their connection) |
|
|
113
113
|
| `glitchless_network` | Ping, lag (play over 150 ms), packet loss and disconnects by level, version, platform, kind of connection and region, with the worst matches and the network findings |
|
|
114
114
|
| `glitchless_servers` | A game's dedicated servers in server mode: servers running now and their players, tick time against its budget by players connected, map and version, crashes with the matches they ended, and memory that climbs. Every other tool reads them with service `<game>.server` |
|
|
115
|
-
| `glitchless_playtest` |
|
|
115
|
+
| `glitchless_playtest` | The game's autoplay bot plays it and the run is compared with a saved baseline ([glitchless-playtest](https://www.npmjs.com/package/glitchless-playtest)): a Unity, Godot, Unreal or GameMaker build from its `command`, a Roblox game in the open Roblox Studio (`engine: "roblox"`, over Studio's MCP server), or a web game in Chrome (needs Playwright in the game project) |
|
|
116
116
|
| `glitchless_deck` | Build the game, send it to the paired Steam Deck, add it to the Deck's library and optionally start it ([glitchless-deck](https://www.npmjs.com/package/glitchless-deck); pair once with `npx glitchless-deck pair`); with `measure: true`, measure a Unity, Godot or Unreal build there and compare it with a saved run |
|
|
117
117
|
|
|
118
118
|
The reads take `hours`, `version`, `env` (e.g. `prod`), `session_type` (`user` for players only, `tester` for people on TestFlight and other test builds, `synthetic` for bots, playtests and store test devices, `all`) and `props`, the session properties the game sets (`{ rank: "diamond" }`, or a list of values). Unless `env` or `session_type` is given, findings read the production sessions of players and say so; the other numbers count every session in the window.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "glitchless-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"mcpName": "io.github.glitchless-gg/glitchless",
|
|
5
5
|
"description": "Coding agents can build a game. They can't see anyone play it. Glitchless lets them. The MCP server for Glitchless, game observability for coding agents: Claude Code, Codex, Cursor and others read real players' stutters, crashes, custom metrics and ranked findings in Unity, Godot, Unreal, Three.js, Roblox, Phaser and GameMaker games, build the game's own dashboard, and run playtest bots.",
|
|
6
6
|
"keywords": [
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"@modelcontextprotocol/server": "^2.4.0",
|
|
69
69
|
"zod": "^4.6.7",
|
|
70
|
-
"glitchless-playtest": "^0.
|
|
70
|
+
"glitchless-playtest": "^0.3.0",
|
|
71
71
|
"glitchless-deck": "^0.1.0"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
package/src/context.js
CHANGED
|
@@ -9,7 +9,7 @@ import path from 'node:path';
|
|
|
9
9
|
import { McpServer } from '@modelcontextprotocol/server';
|
|
10
10
|
import { z } from 'zod';
|
|
11
11
|
|
|
12
|
-
export const VERSION = '0.
|
|
12
|
+
export const VERSION = '0.18.0';
|
|
13
13
|
|
|
14
14
|
// Where `glitchless-mcp login` keeps its workspace key: { url, token, workspace: { id, name }, scopes }.
|
|
15
15
|
export const CREDENTIALS_FILE = path.join(process.env.XDG_CONFIG_HOME || path.join(os.homedir(), '.config'), 'glitchless', 'credentials.json');
|
|
@@ -309,7 +309,7 @@ function instructions(remote) {
|
|
|
309
309
|
...(remote
|
|
310
310
|
? ['After shipping a fix (bump the version passed to Glitchless.init), use glitchless_compare_versions to confirm it with real players.']
|
|
311
311
|
: [
|
|
312
|
-
'Before changing game code, run glitchless_playtest with save_as "baseline"; after the change, run glitchless_playtest again to compare, and treat a FAIL as unfinished work. After shipping a fix (bump the version passed to Glitchless.init), use glitchless_compare_versions to confirm it with real players.',
|
|
312
|
+
'Before changing game code, run glitchless_playtest with save_as "baseline"; after the change, run glitchless_playtest again to compare, and treat a FAIL as unfinished work. It plays a web game in Chrome, runs a Unity, Godot, Unreal or GameMaker build from its command (command, e.g. ["godot", "--path", "."]) with the game\'s autoplay flags, or plays a Roblox game (engine "roblox") in the open Roblox Studio, which needs Studio\'s MCP server on. After shipping a fix (bump the version passed to Glitchless.init), use glitchless_compare_versions to confirm it with real players.',
|
|
313
313
|
'If the game is running in a browser with WebMCP connected, its live tools (glitchless_live_performance, glitchless_measure, glitchless_inspect_scene, and game tools such as zoomies_load_level) let you reproduce and measure issues directly. Unity, Godot, Unreal and GameMaker builds measure themselves when run with --glitchless-measure=SECONDS (-glitchless-measure in Unreal and GameMaker); in the Unreal editor, Unreal MCP with the Glitchless Toolset has a Measure tool.',
|
|
314
314
|
]),
|
|
315
315
|
].join(' ');
|
package/src/tools/analytics.js
CHANGED
|
@@ -13,7 +13,7 @@ tool(
|
|
|
13
13
|
rate: z.string().optional().describe('The share of the event\'s events where a flag holds ("won": true or false, or 1 or 0) or a word outcome holds ("result=win")'),
|
|
14
14
|
avg: z.string().optional().describe('A numeric attribute\'s mean per event, e.g. "duration_s"'),
|
|
15
15
|
of: z.string().optional().describe('A numeric attribute whose distribution to give, e.g. "duration_s" (match length) or "placement"'),
|
|
16
|
-
by: z.string().optional().describe('With rate, avg or of: split by an attribute (a list splits by element), $version, $level, $zone, $platform, $browser, $device_tier, $link (the kind of connection), or a session property ("$rank")'),
|
|
16
|
+
by: z.string().optional().describe('With rate, avg or of: split by an attribute (a list splits by element), $version, $level, $zone, $platform, $browser, $device_tier, $link (the kind of connection), $graphics (the graphics setting), or a session property ("$rank")'),
|
|
17
17
|
min: z.number().int().optional().describe('With rate or avg and by: the fewest events a row needs (default 30 for a rate, 10 for an average); smaller rows are counted in small'),
|
|
18
18
|
first: z.boolean().optional().describe('With name: the seconds from each session\'s start to its first such event (median_s, p90_s, over the sessions that sent it) and the ended sessions that never sent it (never, ended, never_pct). For a lobby: how long players stay before first leaving, and how many never leave. Works for events a Roblox server sends for a player'),
|
|
19
19
|
detail: z.boolean().optional().describe("Every value of every attribute and property, with its sessions (default: the top 5 of each)"),
|
package/src/tools/core.js
CHANGED
|
@@ -47,7 +47,7 @@ tool(
|
|
|
47
47
|
|
|
48
48
|
tool(
|
|
49
49
|
'glitchless_performance',
|
|
50
|
-
"Frame-time breakdown for a game: global percentiles, per-level p50/p95/p99 with draw calls / triangles / geometry counts / game-context gauges, hitch causes (script, shader compile, PSO compile in Unreal, GC, asset or map load), what is on screen during hitches, which events precede hitches, per GPU tier / browser / platform / version, per screen (by_display: each refresh rate's sessions, its budget_ms and share of play, so 120 Hz and 60 Hz phones read apart), per zone for an open-world game or hub that sets them (by_zone: each zone's frame time and hitches_per_min, and its time: seconds and share_pct of play time, sessions that went there and median_s, their median time in it; zone keeps one), memory growth per level load and the slowest recent hitches with script attribution. Every frame is judged against its own screen's budget: pct_over_budget is the share of frames slower than 1.15x their own window's budget_ms (under 5% means the p95 is on time on players' own screens; a 60 Hz phone's 16.7 ms frames are on time next to 120 Hz ones), so read it, not p95 against frame_budget_ms (the median screen's). With by_prop, frame time, hitches and crash-free sessions per value of a session property (a graphics preset, a class). A multiplayer game also gets `network` (ping, loss and disconnects; glitchless_network has more).",
|
|
50
|
+
"Frame-time breakdown for a game: global percentiles, per-level p50/p95/p99 with draw calls / triangles / geometry counts / game-context gauges, hitch causes (script, shader compile, PSO compile in Unreal, GC, asset or map load), what is on screen during hitches, which events precede hitches, per GPU tier / browser / platform / version, per graphics setting (by_graphics: a `graphics` property the game sets, else what the SDK read itself, Roblox's Graphics Quality Automatic or 1 to 10; lowest to highest, only sessions that have one), per screen (by_display: each refresh rate's sessions, its budget_ms and share of play, so 120 Hz and 60 Hz phones read apart), per zone for an open-world game or hub that sets them (by_zone: each zone's frame time and hitches_per_min, and its time: seconds and share_pct of play time, sessions that went there and median_s, their median time in it; zone keeps one), memory growth per level load and the slowest recent hitches with script attribution. Every frame is judged against its own screen's budget: pct_over_budget is the share of frames slower than 1.15x their own window's budget_ms (under 5% means the p95 is on time on players' own screens; a 60 Hz phone's 16.7 ms frames are on time next to 120 Hz ones), so read it, not p95 against frame_budget_ms (the median screen's). With by_prop, frame time, hitches and crash-free sessions per value of a session property (a graphics preset, a class). A multiplayer game also gets `network` (ping, loss and disconnects; glitchless_network has more).",
|
|
51
51
|
{
|
|
52
52
|
...common,
|
|
53
53
|
level: z.string().optional().describe('Focus on one level id, e.g. "level-2"'),
|
|
@@ -68,6 +68,7 @@ tool(
|
|
|
68
68
|
by_browser: d.by_browser.map(slimGroup),
|
|
69
69
|
by_version: d.by_version.map(slimGroup),
|
|
70
70
|
by_platform: (d.by_platform || []).map(slimGroup),
|
|
71
|
+
...(d.by_graphics?.length ? { by_graphics: d.by_graphics.map(slimGroup) } : {}),
|
|
71
72
|
by_display: (d.by_display || []).map((g) => ({ ...slimGroup(g), hz: g.hz, budget_ms: g.budget_ms, windows_pct: g.windows_pct })),
|
|
72
73
|
// Each zone's frame time and hitches, and its time: share of play time, the sessions that went there, their median.
|
|
73
74
|
...(zones ? { by_zone: zones.map((z) => ({ ...slimGroup(z), hitches: z.hitches, seconds: z.seconds, share_pct: z.share_pct, median_s: z.median_s })) } : {}),
|
|
@@ -108,7 +109,7 @@ tool(
|
|
|
108
109
|
'Player experience per level: sessions that started vs completed each level, attempts, deaths per session and their causes, fails, abandons and the attempts a disconnect ended (never counted as fails), median and slowest clear times, rage quits (quit ≤20s after dying), session length distribution, recent rage quits with positions, and recent rage inputs (one key mashed: the SDKs count them in kpis.rage_inputs) with their level, time, key and, for a game that sends positions, where the player stood. With by, each level per value of what describes the attempt: an attribute the game passed to levelStart ("tier", "difficulty", "party_size"; a list such as "build" counts under each element), a session property ("$class") or a split ("$platform"): clears and wipes by difficulty, by group size, by class; level keeps one level; count "runs" counts each run once at each level it reached (a roguelite\'s biomes). Also retention: of the players first seen each day, the share back 1, 7 and 30 days later (D1, D7, D30; hours of 48 or more for D1), and with by_prop per value of a session property (spenders against the rest). Retention needs player IDs: status "anonymous" means the game sends none, and privacy "install" in the SDK turns them on. With hotspots, for a game that sends positions: where players die instead, on one level (level), in one zone (zone, as the game passes it to setZone) or, with neither, anywhere in the game (a hub or lobby with no level set): clustered death positions in world coordinates (x range, share of the place\'s deaths, top cause, rage quits at that spot), the bounds and the place\'s stats (a level\'s completion; a zone\'s sessions, deaths and rage quits), to find a difficulty spike and then the level data around it.',
|
|
109
110
|
{
|
|
110
111
|
...common,
|
|
111
|
-
by: z.string().optional().describe('Split each level\'s attempts: an attribute of its levelStart ("tier"), a session property ("$class") or $platform, $browser, $device_tier, $link'),
|
|
112
|
+
by: z.string().optional().describe('Split each level\'s attempts: an attribute of its levelStart ("tier"), a session property ("$class") or $platform, $browser, $device_tier, $link, $graphics'),
|
|
112
113
|
level: z.string().optional().describe('With by or count: only this level; with hotspots: the level, e.g. "level-3"'),
|
|
113
114
|
zone: z.string().optional().describe('With hotspots: the zone instead of a level, e.g. "hall" (neither: the whole game)'),
|
|
114
115
|
count: z.enum(['runs']).optional().describe('"runs": each run (setGroup("run")) counted once at each level it reached'),
|
package/src/tools/dashboard.js
CHANGED
|
@@ -44,7 +44,7 @@ const panelSchema = z
|
|
|
44
44
|
size: z.enum(['s', 'm', 'l']).optional().describe('s = a quarter row (stats), m = half, l = full width'),
|
|
45
45
|
metric: z.string().optional().describe('stat: sessions, players, avg_session_s, median_session_s, crash_free_pct, error_free_pct, frame_p95, avg_fps, hitches_per_min, errors, deaths, rage_quit_pct, hours_played (the time the game was on screen), players_now (sessions playing in the last two minutes, whatever the range), runs (each run once). Network (multiplayer): ping_p50, ping_p95 (ms), loss_pct, disconnects_per_hour, disconnect_pct (level attempts a disconnect ended). Servers (from the game\'s servers in server mode): servers_now (running now, with the players connected to them), server_tick_p95, server_crash_free_pct, players_per_server. Zones (a game that sets them with setZone; give zone): zone_time_pct (the zone\'s share of play time), zone_median_s (the median time in it of the sessions that went there). deaths and errors take per "$hours": deaths per hour played'),
|
|
46
46
|
zone: z.string().optional().describe('stat with metric zone_time_pct or zone_median_s: the zone, as the game names it with setZone ("hall")'),
|
|
47
|
-
event: z.string().optional().describe('stat, series, breakdown, distribution, table: one event, "name", "name=value" or "name:key=value". A list attribute (a deck, a build) matches when it has the value, and "battle_end:deck=hog_rider+ice_spirit" when it has all of them (any pair or trio). A series or breakdown by $platform, $browser or $
|
|
47
|
+
event: z.string().optional().describe('stat, series, breakdown, distribution, table: one event, "name", "name=value" or "name:key=value". A list attribute (a deck, a build) matches when it has the value, and "battle_end:deck=hog_rider+ice_spirit" when it has all of them (any pair or trio). A series or breakdown by $platform, $browser, $device_tier, $link or $graphics can leave it out: then it counts sessions (and players, with player IDs) in each. A breakdown by $zone without it is the time played in each zone (frame time drawn there, paused in the background): each row\'s seconds, share_pct of all play, the sessions that went there (sessions_pct of all), players and median_s, their median time in it; time outside every zone is "(none)"'),
|
|
48
48
|
sum: z.string().optional().describe('stat, series, breakdown: add up this numeric attribute instead of counting events, e.g. "amount" of "purchase" for revenue. Money (events with a currency, an ISO code or "ROBUX") shows in the game\'s currency; amounts in another currency are named, never added (Robux are never added to dollars). The event can be filtered, also split by an attribute: revenue of completed purchases by item is event "purchase:result=done", by "item", sum "amount" (read from each session\'s first 16 of the event), so cancelled purchases can carry their amount too'),
|
|
49
49
|
devex: z.boolean().optional().describe('stat, series, breakdown with sum, in Robux: also give what the Robux would be worth in US dollars at Roblox\'s DevEx rate (devex: {estimate: true, robux, usd, rate, since, source}; a breakdown\'s rows each get usd). Always an estimate: it is the price players paid at DevEx\'s standard rate, and what the experience can cash out is less. Other currencies get devex null'),
|
|
50
50
|
per: z.string().optional().describe('stat: divide by this event to get a percentage (event "buy=done" per "paywall"); or "$players" / "$sessions": the share of them that sent the event (conversion), or with sum, the sum per player or session (revenue per player); or "$hours": per hour played (matches per hour, with sum XP or gold per hour). series, breakdown: "$hours", each bucket or row per hour played (by $version or $level each over its own hours, by an attribute every row over the window\'s)'),
|
|
@@ -59,7 +59,7 @@ const panelSchema = z
|
|
|
59
59
|
never: z.string().optional().describe('stat, instead of event: the share of the window\'s ended sessions that never sent this event (ended: sent session_end, or nothing for 30 minutes), with count and base: players who never left the lobby (never "hall_left"), never bought. Sessions still playing aren\'t counted. Over 31 days or less'),
|
|
60
60
|
bins: z.number().int().optional().describe('distribution: how many histogram bars, 2 to 40 (default 20). Bars are equal round steps from the 1st to the 99th percentile; under and over count what falls outside'),
|
|
61
61
|
unit: z.string().optional().describe('distribution, stat with of: what the numbers are in, shown after them ("s" reads as minutes or hours when large, or the game\'s own word: "floors")'),
|
|
62
|
-
by: z.string().optional().describe('series, breakdown, distribution: the attribute to split by, e.g. "mode" or "what" (a list attribute splits by element: each card of a deck gets a row, and an event counts once under each), or $version / $level / $zone (where the player was in an open world, setZone), or a split of the sessions that sent the event: $platform (Windows, macOS, Linux, Steam Deck, iOS, Android, Web
|
|
62
|
+
by: z.string().optional().describe('series, breakdown, distribution: the attribute to split by, e.g. "mode" or "what" (a list attribute splits by element: each card of a deck gets a row, and an event counts once under each), or $version / $level / $zone (where the player was in an open world, setZone), or a split of the sessions that sent the event: $platform (Windows, macOS, Linux, Steam Deck, iOS, Android, Web…; a Roblox game\'s Computer, Phone, Tablet, Xbox, PlayStation, VR), $browser (Chrome, Safari, Firefox, Edge…; a native build is "Godot app", "Unity app" and so on, a web build "Unity web build"), $device_tier (High-end, Mid-range, Low-end GPU, Software rendering: the tiers the Performance view uses, high to low), $link (Wi-Fi, Mobile data, Wired), $graphics (the graphics setting the session played at: a `graphics` property the game sets, else what the SDK read itself, Roblox\'s Graphics Quality as Automatic or 1 to 10; Automatic first, then lowest to highest, "(none)" without one), or a session property the game sets with setProperties ($rank, $class, $region: sessions without it are "(none)", 40 values at most); counts only, no sum, over 31 days or less. levels and deaths: an attribute of the level\'s start ("tier", "party_size", a list such as "build"), a property or a split. net: $version, $level, $zone, a split or a property. servers: "players" (connected, in tenths of capacity), $level or $version. retention: a property ($spender). frame_time: $zone or $level, a row per value with frame time p50, p95, p99, frames over budget, hitches per minute played and its share of play time. versions: also a property ($class), its values side by side. A breakdown (by count) can also split by a Steam fact of the sessions that sent the event: $steam_branch, $steam_build, $steam_hardware, $steam_controller, $steam_language, $proton, $big_picture, $family_shared, $timed_trial. versions: $steam_branch or $steam_build compares Steam branches or builds on this page\'s stats instead of versions (the beta against "public"); needs a game that uses Steamworks'),
|
|
63
63
|
limit: z.number().int().optional().describe('How many: errors, findings, reports and breakdown rows up to 20, sessions up to 50, series lines up to 8, distribution rows up to 8, retention days up to 90 (default 14), table rows per group up to 100 (default 20; at most 30 groups, the rest counted in more_groups)'),
|
|
64
64
|
steps: z.string().optional().describe('funnel: events in order, comma-separated, e.g. "paywall,buy=tapped,buy=done"'),
|
|
65
65
|
label: z.string().optional().describe('levels: what the game calls a level, e.g. "Stop" or "Puzzle"'),
|
|
@@ -117,7 +117,7 @@ define(
|
|
|
117
117
|
{
|
|
118
118
|
title: 'Save dashboard',
|
|
119
119
|
description:
|
|
120
|
-
"Save the game's dashboard: its pages, in the order the sidebar shows them. Each page is a board of panels in the game's own words, or a built-in view (events, performance, errors, players, heatmaps, sessions, versions, live, reports, servers, matches) the game keeps, renames or drops. Design it for this game, not for a genre it isn't: a puzzle game cares about solve time and hints, a mobile game about opens, modes, the paywall and purchases (revenue: a stat with sum \"amount\" of \"purchase\"; revenue per player: per \"$players\"; conversion: event \"purchase\" per \"$players\"; revenue by item: a breakdown with sum, of completed ones only with event \"purchase:result=done\"; a Roblox game's money is in Robux: currency \"ROBUX\", and devex true on a panel adds an estimate in dollars), a platformer about deaths per level (and a positions panel for where on a level they die). For a game on several platforms, a breakdown by $platform splits players or an event between them (iOS vs Android, PC vs Mac vs Steam Deck); a web game splits by $browser,
|
|
120
|
+
"Save the game's dashboard: its pages, in the order the sidebar shows them. Each page is a board of panels in the game's own words, or a built-in view (events, performance, errors, players, heatmaps, sessions, versions, live, reports, servers, matches) the game keeps, renames or drops. Design it for this game, not for a genre it isn't: a puzzle game cares about solve time and hints, a mobile game about opens, modes, the paywall and purchases (revenue: a stat with sum \"amount\" of \"purchase\"; revenue per player: per \"$players\"; conversion: event \"purchase\" per \"$players\"; revenue by item: a breakdown with sum, of completed ones only with event \"purchase:result=done\"; a Roblox game's money is in Robux: currency \"ROBUX\", and devex true on a panel adds an estimate in dollars), a platformer about deaths per level (and a positions panel for where on a level they die). For a game on several platforms, a breakdown by $platform splits players or an event between them (iOS vs Android, PC vs Mac vs Steam Deck); a web game splits by $browser, any game by $device_tier, and by $graphics to see whether a lower graphics setting holds the frame rate (a Roblox game gets it without code; another engine sets a `graphics` property with its preset). For balance and outcomes, a breakdown with rate gives each row its rate and interval next to the overall one (win rate by hero: event \"match_end\", by \"hero\", rate \"won\"); per \"$hours\" turns counts and sums into rates per hour played (gold per hour); a distribution panel or a stat with of and quantile shows how long matches or runs last; a stat with first gives the median seconds from a session's start to its first event of a kind (time in the lobby: first \"hall_left\"), and one with never the share of ended sessions that never sent it (never left the lobby), so the game needn't time it by hand; a breakdown of steps or days takes order \"value\" (day 1 to 7 in order); a table lists an event's events one by one, grouped and sorted (daily runs by day, best score first: type \"table\", event \"daily_run\", group_by \"day_label\", sort \"-score\", of \"score\"); a list attribute (deck, build, boons) splits by element. Split by what the game set for the session with setProperties ($rank, $class, $region), and give a page where to show only some sessions (a page for the high ranks); a levels panel by a levelStart attribute shows clears by tier or difficulty, and count \"runs\" runs per biome. A multiplayer game gets a Network page (ping_p95 and disconnect_pct stats, net panels by $region or $link), and one whose dedicated servers run the SDK in server mode a Servers page (servers_now, server_tick_p95, a servers panel by players) or the built-in servers view; a game that sets match groups can keep the built-in matches view. An open world or an avatar hub that names its zones (setZone) gets where play time goes and how each zone runs: a breakdown by $zone without event (time in each zone), zone_time_pct and zone_median_s stats with zone, and frame_time by $zone (hitches per zone); don't send zone timing as custom events. The first page opens first. Use the events the game sends (glitchless_events lists them, with their attributes); on a board, stats first, then the game's own events and funnels, then levels, frame_time and errors. Leave out what the game has no data for (no Heatmaps page for a game without positions, no reports page for a game that doesn't turn bug reports on). Send every page: read the current ones with glitchless_dashboard (its spec), change them, send them all back. Pass reset: true to go back to the automatic dashboard. accent sets the colour of the game's boards and share links (links, the selected page, stats, the main chart series, the map), logo and banner their logo and header picture (the game's key art, behind each board's title), and background gives a level, a zone or the whole game a heatmap background (a top-down picture and its world bounds); each can be sent alone. A picture is a file on this computer, which the local server (npx glitchless-mcp) reads, or base64. The hosted server can't read your files: for file (or upload: true on any server) it answers with an upload link instead, and you send the picture with one curl (curl -X PUT --data-binary @file '<link>', no key). A link lasts 10 minutes, takes one picture for its one slot (the logo, the banner, or one place's background with the bounds it was made with) and then stops working; a picture refused for its size or type can be sent again until it expires, and a game gets at most 30 links an hour. Each slot's limit: a logo at most 100 KB and 1024 × 1024 pixels, a banner 300 KB and 4096 × 2048, a background 256 KB and 4096 × 4096, all PNG, JPEG or WebP. Needs a secret key with the dashboard scope.",
|
|
121
121
|
inputSchema: {
|
|
122
122
|
service: z.string().optional().describe('Game service name (defaults to the most recently active game)'),
|
|
123
123
|
pages: z.array(pageSchema).max(20).optional().describe('Every page, in order: at most 20 (boards and built-in views together)'),
|
package/src/tools/playtest.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// Unlike the read tools, this one acts: it launches browsers and writes
|
|
2
|
-
// in the project, so it is registered without the read-only hint.
|
|
1
|
+
// Unlike the read tools, this one acts: it launches browsers or the game's own build, or plays in Roblox Studio, and writes
|
|
2
|
+
// .glitchless/playtest/<name>.json in the project, so it is registered without the read-only hint.
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { playtest } from 'glitchless-playtest';
|
|
5
5
|
import { define, base, apiKey, defaultService, fail } from '../context.js';
|
|
@@ -8,17 +8,20 @@ define(
|
|
|
8
8
|
'glitchless_playtest',
|
|
9
9
|
{
|
|
10
10
|
description:
|
|
11
|
-
|
|
11
|
+
'Playtest the game with its autoplay bot and compare against a saved baseline. Call with save_as "baseline" BEFORE changing code, then without arguments AFTER the change; a FAIL lists the regressions, warnings and improvements are listed too. Web games (Three.js, Phaser, Babylon.js, PlayCanvas): bots play fixed-seed scenarios in real Chrome, one at a time, against the running game (game_url); this needs the Glitchless server running and Playwright installed in the project, and takes 1–5 minutes (quick: about 1). Unity, Godot, Unreal and GameMaker: give command (or "command" in glitchless.playtest.json), what starts the build, such as ["godot", "--path", "."] or an exported build; each scenario starts it with the game\'s own autoplay flags (by default two runs: --autoplay --seed=7, then --seed=21) plus --glitchless-measure, and the Glitchless SDK in the build measures 10 seconds per run (a scenario\'s "seconds") and quits; no server or browser is needed. The game needs an autoplay mode that reads those flags and keeps playing for the whole measure: if it quits sooner, or never starts a level with the default scenarios, the error says how to fix it. Roblox: give engine "roblox" (or "engine": "roblox" in glitchless.playtest.json); it plays the place open in Roblox Studio, which needs Studio open with its MCP server on (Assistant → … → Manage MCP Servers → Enable Studio as MCP server) and Allow HTTP Requests on, and studio (part of the place\'s name) when several Studios are open. Each scenario sets its params as Workspace attributes (by default autoplay = true, seed = 7, then seed = 21) for the game\'s bot to read, plays until workspace:GetAttribute("GlitchlessPlaytestDone") is true or 90 seconds pass, stops, and puts the attributes back; the play test\'s sessions are read back from the Glitchless server this tool reads, so the game\'s Glitchless.init has to send there. All compare slow frames, frame time p95 and p99, render and update CPU, draw calls, hitches, errors and crashes, overall and per level (an engine build also GPU time and what grew over a run, run by run). A headless build, or runs on different frame budgets, only warn on frame times. Runs are saved in .glitchless/playtest/ in the project.',
|
|
12
12
|
inputSchema: {
|
|
13
13
|
save_as: z.string().optional().describe('Save this run under a name, e.g. "baseline" before a change'),
|
|
14
14
|
compare_to: z.string().optional().describe('Saved run to compare with (default "baseline" when saved)'),
|
|
15
15
|
quick: z.boolean().optional().describe('Play only the first scenario (about a minute)'),
|
|
16
|
-
game_url: z.string().optional().describe('
|
|
17
|
-
|
|
16
|
+
game_url: z.string().optional().describe('Web games: the URL to play (default http://localhost:5173/ or glitchless.playtest.json)'),
|
|
17
|
+
engine: z.enum(['roblox', 'unity', 'godot', 'unreal', 'gamemaker']).optional().describe('"roblox" plays the place open in Roblox Studio; the others are told from command, so only needed when its name doesn\'t say (default: "engine" in glitchless.playtest.json)'),
|
|
18
|
+
studio: z.string().optional().describe('Roblox: which open Studio to play in, part of its place\'s name (needed when several are open)'),
|
|
19
|
+
command: z.array(z.string()).optional().describe('Unity, Godot, Unreal or GameMaker: the command that starts the build, e.g. ["godot", "--path", "."], ["./build/MyGame.x86_64"] or ["builds/MyGame.app"]; paths are from the project folder (default: "command" in glitchless.playtest.json)'),
|
|
20
|
+
max_seconds: z.number().min(10).max(600).optional().describe('Cap each run at this many seconds (an engine build: the seconds it measures)'),
|
|
18
21
|
},
|
|
19
22
|
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
|
|
20
23
|
},
|
|
21
|
-
async ({ save_as, compare_to, quick, game_url, max_seconds } = {}, ctx) => {
|
|
24
|
+
async ({ save_as, compare_to, quick, game_url, engine, studio, command, max_seconds } = {}, ctx) => {
|
|
22
25
|
const token = ctx?.mcpReq._meta?.progressToken;
|
|
23
26
|
let step = 0;
|
|
24
27
|
const log = (message) => {
|
|
@@ -30,7 +33,7 @@ define(
|
|
|
30
33
|
compareTo: compare_to,
|
|
31
34
|
quick,
|
|
32
35
|
maxSeconds: max_seconds,
|
|
33
|
-
config: { server: base(), api_key: apiKey() || undefined, service: defaultService() || undefined, game: game_url },
|
|
36
|
+
config: { server: base(), api_key: apiKey() || undefined, service: defaultService() || undefined, game: game_url, command: command?.length ? command : undefined, engine, studio },
|
|
34
37
|
log,
|
|
35
38
|
});
|
|
36
39
|
const files = Object.entries(r.files || {}).map(([k, f]) => `${k}: ${f}`).join('\n');
|
|
@@ -39,6 +42,6 @@ define(
|
|
|
39
42
|
return fail(err);
|
|
40
43
|
}
|
|
41
44
|
},
|
|
42
|
-
// It plays the game in Chrome on this computer, so it is not served over HTTP.
|
|
45
|
+
// It plays the game in Chrome, runs its build or drives Roblox Studio on this computer, so it is not served over HTTP.
|
|
43
46
|
{ local: true },
|
|
44
47
|
);
|