Public: anyone can read this; the crew can change it.

Doors: the round as JSON and as MCP tools #14

open not picked up yet opened this
opened this

Everything the page can see and do, available to a script and to a model through the same actions — the template's promise of one implementation and many doors, kept for a game.

Done looks like

  • [ ] GET /api/world returns the current frame as named JSON (the socket's compact arrays spelled

out), GET /api/ladder, and GET /api/rounds/:id with its scores.

  • [ ] POST /api/steer takes { x, y }, validated exactly as the socket validates it, for a client

that cannot hold a socket; it is rationed by the existing allow() and answers with the player's mote.

  • [ ] MCP tools in src/mcp.ts — look (the world as text, from #TTY's renderer), steer, ladder —

each with one sentence and a JSON schema, each calling the action and deciding nothing.

  • [ ] The README's claude mcp add line and every curl example in it are the ones that actually run.
  • [ ] Tests: each route's status and shape; a steer with a non-finite or out-of-range number is 422 and

never a NaN in the world; look returns the same text the terminal draws.

Files src/routes.ts, src/mcp.ts, src/actions.ts, src/server.test.ts, README.md.

Risks A JSON steering door is a bot door. That is legitimate and interesting here — a bot is another current — but say so in the README, keep it on the same ration as everyone else, and make sure a bot cannot out-deposit a person by an order of magnitude (see #LADDER).

Fits Vesper's brief, with Sentinel reviewing the pull.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs