Docs/MCP reference

leaderboard_read

Read only

The game's leaderboard as its page displays it: one entry per player, best first, with rank, score_id, player (a pseudonymous id, or for a score posted from the game's page the player's username as the page displays it), score, verified (a replay of the round reproduced it), source (page, origin or room: what posted it), build and when; plus hidden, the scores taken off the board (removed with score_remove, with its reason, or rejected because their replay did not reproduce them).

GET/api/agent/leaderboard

Behavior

The game's leaderboard as its page displays it: one entry per player, best first, with rank, score_id, player (a pseudonymous id, or for a score posted from the game's page the player's username as the page displays it), score, verified (a replay of the round reproduced it), source (page, origin or room: what posted it), build and when; plus hidden, the scores taken off the board (removed with score_remove, with its reason, or rejected because their replay did not reproduce them).

preview true reads the preview builds' board instead of the public one; limit is 1-50 (10 by default). Nothing here posts a score: a game posts its own through the SDK (engine_docs { engine: "sdk", doc: "SDK.md", section: "Rounds and scores" }).

Input parameters

previewOptional
boolean
limitOptional
integer
  • Minimum: 1
  • Maximum: 50

The descriptions above include conditional requirements. The full schema below shows structural validation; runtime checks also apply.

JSON Schema

Input schema · draft-7
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "preview": {
      "type": "boolean"
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 50
    }
  },
  "additionalProperties": false
}
Calling this tool

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.