Building With an AI Agent
Give a coding agent Glint's rules and SDK docs through Foundry's public MCP server, glint.joinfoundry.xyz/llms.txt and the portable SKILL.md.
Glint SDK · 5 min read
Give your coding agent Glint's rules (no network access, root index.html and glint.json in the ZIP, size budgets, and SDK lifecycle and mute calls) before it writes code. You can give them through the public MCP server, llms.txt, or the skill file that comes with the SDK.
Connect the Public MCP Server#
Foundry's public MCP address needs no account and no sign-in:
Plain texthttps://api.joinfoundry.xyz/mcp/public
Add it to your client the same way as the signed-in address, without the sign-in step:
Claude Codeclaude mcp add --transport http glint https://api.joinfoundry.xyz/mcp/public
Claude and ChatGPT add it as a custom connector. Setup for every client is in Connect an AI Client.
The Glint SDK Tools#
The public address offers four read-only tools. Each returns a short, focused answer, so an agent can ask for only the part it needs.
| Tool | What it returns | Input |
|---|---|---|
glint_sdk_rules |
Size and rate budgets, Performance Score and Brotli repackaging tiers, Package X-Ray behavior, the zero-network sandbox and CSP, multiplayer and built-in room chat and voice rules, CLI install and update flags, the Glint Studio publishing steps, and the glint.json v1 schema. |
section: all (default), limits, sandbox, manifest, multiplayer, cli or publishing |
glint_sdk_api |
Exact TypeScript signatures, behavior contracts, and snippets for all modules or a single runtime module. | topic: all, overview (default), lifecycle, meter, demo, system, player, saves, achievements, leaderboards, multiplayer or input |
glint_sdk_engine_guide |
Setup, the starter CLI template, export settings, and common pitfalls for one engine. | engine: vanilla (default), phaser, threejs, pixijs, kaplay, godot, unity or wasm |
glint_sdk_diagnose |
The meaning and fix for any CLI validator code (GL001-GL014, GL101-GL104) or descriptive diagnostic key. An unknown code returns the list of known keys. |
code: e.g. GL003 or FP002_INVALID_MANIFEST |
When you're signed in to the account address (https://api.joinfoundry.xyz/mcp) with Marketplace access, you also get the Glint Studio tools:
| Tool | Scope | What it does |
|---|---|---|
glint_list_my_games |
marketplace:read or marketplace:write |
Lists all games you manage in Glint Studio (drafts and published), with IDs, slugs, revisions, build/cover status, and Studio URLs. |
glint_studio_game_config |
marketplace:read or marketplace:write |
Reads one game's revision, metadata, real achievement keys, leaderboard IDs and score bounds, live/pending build status, Package X-Ray findings, and exact publishChecklist. |
glint_create_game |
marketplace:write |
Creates a new Glint Studio draft game (title, optional slug). |
glint_update_game |
marketplace:write |
Updates title, slug (before first publish), description, genres, controls, orientation, price, cover/screenshot media IDs, and patch notes. |
glint_upsert_achievement |
marketplace:write |
Creates or updates an achievement definition in Glint Studio to match sdk.achievements.unlock(key). |
glint_upsert_leaderboard |
marketplace:write |
Creates or updates a leaderboard definition in Glint Studio to match sdk.leaderboards.submit(key, score). |
The full list of Foundry's tools is in the Tool Reference.
Point an Agent at llms.txt#
Glint publishes a plain-text summary for AI agents at:
Plain texthttps://glint.joinfoundry.xyz/llms.txt
It lists the public and authenticated MCP tools, the core platform rules, and the glint CLI commands for validating and publishing builds.
Use the Portable Skill File#
The SDK package includes SKILL.md, a skill file written for coding agents. After you install the SDK it's in your project at:
node_modules/@joinfoundry/glint-sdk/SKILL.md
Copy it to wherever your coding agent reads skills or project instructions, or tell the agent to read it at the start of a task. It covers platform rules, lifecycle, pause and mute handling, saves, multiplayer, local validation, and the "Upload this to Glint" publishing flow.
Upload Directly From Your Coding Agent#
Once you create a Foundry personal token with Marketplace write (marketplace:write) access in AI Agents settings and set FOUNDRY_API_TOKEN in your shell, you can tell your coding agent:
"Upload this to Glint."
Following SKILL.md, your agent will:
- Check that you are using the latest
@joinfoundry/glint-sdk(vianpx --yes --prefer-online -p @joinfoundry/glint-sdk@latest glint ..., or by updating withnpm install @joinfoundry/glint-sdk@latest). - Run
glint publish --inspect --jsonto readglint.json, locate your build folder, check existing Glint Studio games, and scan for cover and screenshot images (including checking Glint's16:10, minimum640x400cover requirement). - Ask for any missing details: whether this is a new game or an update, title, semver version, short description, 1 to 3 genres, controls, orientation, free or paid pricing, and whether to use project images for the cover and screenshots or upload them manually on the site.
- Update
glint.json, runglint validate --json(fixing any blockingGL001-GL014errors), and runglint publish ... --jsonto create or update the game, upload media and the build ZIP, and wait for Package X-Ray and Brotli inspection. - Return a direct Glint Studio link (
https://glint.joinfoundry.xyz/studio/games/<gameId>; the game is also in the Releases list athttps://glint.joinfoundry.xyz/studio) and list what's left to finish in Glint Studio, such as content rating, rights confirmation or a cover image.
Recommended Workflow#
- Make sure you're on the latest
@joinfoundry/glint-sdk(npm view @joinfoundry/glint-sdk version,npm install @joinfoundry/glint-sdk@latest, or usenpx --yes --prefer-online -p @joinfoundry/glint-sdk@latest glint ...). - Have the agent read the rules and API signatures first:
glint_sdk_rules(section="all")(or targeted sectionslimits,sandbox,cli,publishing) andglint_sdk_api(topic="all"). - Scaffold with the CLI for your engine and build the smallest playable version. The commands are in the Glint SDK Quickstart .
- Run the build in the local emulator, then run
glint validate --jsonand fix every error. The codes and fixes are in CLI and Local Emulator . - Tell your agent to upload the build (
glint publish), answer its metadata and cover-image questions, and open the returned Glint Studio link to complete content rating and click Publish. - Use
glint_upsert_achievement/glint_upsert_leaderboardandglint_studio_game_configto keep your game's achievements and leaderboards in sync with Glint Studio.
Keep the platform rules in your project's instruction file too, so a new session starts with them. Platform Rules and Budgets has the full list.
Still stuck? Contact Support.