Skip to main content
Glama

Get Leaderboard Reward

horizon_get_leaderboard_reward
Read-onlyIdempotent

Check a player's rank reward status for the previous leaderboard period (none, pending, available, or claimed) before claiming the reward.

Instructions

Returns the player's rank reward of the previous scoring period of a board: none, pending, available to claim, or already claimed. Use when: a weekly or monthly period ended and the game wants to show 'you placed 3rd, claim 500 coins'; call it before horizon_claim_leaderboard_reward. Not for: crediting the reward (use horizon_claim_leaderboard_reward) or the final standings (use horizon_get_leaderboard_top with period previous). Requires: userId and the player's session: sign in with horizon_signin_email or horizon_signin_anonymous and pass its accessToken as sessionToken. Side effects: None (read only). Returns: {status, period {start, end, finalAt, standingsFinal}, rank, values [{key, amount}], finalAt, claimableUntil, claimedAt}; fields that do not apply are left out. status NONE: no previous period or no rank in a reward tier. PENDING: the period ended but its standings are not final yet (see finalAt). AVAILABLE: claim it with horizon_claim_leaderboard_reward before claimableUntil. CLAIMED: already credited (claimedAt). The server alone decides rank and amounts from the final standings of the previous period; the client never sends them. An unclaimed reward expires when the following period ends. Errors: 404 for an unknown leaderboardKey: list valid keys with horizon_list_leaderboards. 401 means the session is missing or expired: sign in again and retry with the new accessToken. 403 for a session means the token belongs to another user: pass the userId that signed in. Needs HORIZON_API_KEY. Every failure returns an error result (isError) with the HTTP status and body: a 401 that horizon_test_connection also returns means HORIZON_API_KEY is wrong, 429 means the account's per-minute rate limit was reached (wait a minute, then retry).

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": {
      "leaderboardKey": "<leaderboardKey>",
      "userId": "<userId>",
      "sessionToken": "<sessionToken>"
    },
    "name": "horizon_get_leaderboard_reward"
  }
}

Input Schema

NameRequiredDescriptionDefault
userIdYesPlayer user ID (UUID) from horizon_signup_* or horizon_signin_*
sessionTokenYesaccessToken from horizon_signin_email or horizon_signin_anonymous for this userId; sent as a Bearer session
leaderboardKeyYesBoard key from horizon_list_leaderboards (1 to 64 characters: a-z, 0-9, _ and -). Rewards exist only on named boards

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.15.0

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly/idempotent/non-destructive/openWorld, yet the description still adds substantive behavior: the status state machine (NONE/PENDING/AVAILABLE/CLAIMED), that standings may not be final (finalAt), the expiry rule for unclaimed rewards when the next period ends, claimableUntil/claimedAt semantics, and that the server alone computes rank and amounts. It also discloses auth prerequisites (HORIZON_API_KEY, sessionToken), error mapping (404/401/403/429) and that failures return isError with HTTP status and body.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose, then Use when / Not for / Requires / Side effects / Returns / Errors — a clean, scannable structure with no filler. It is on the long side and a few clauses repeat structured data ('Side effects: None (read only)' versus readOnlyHint, 'Requires: userId and the player's session' versus the schema descriptions), but the density is justified for a state-machine tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description carries the return contract itself and does so fully: it names every field (status, period with start/end/finalAt/standingsFinal, rank, values, finalAt, claimableUntil, claimedAt), explains which are omitted when inapplicable, and interprets each status value. Auth, error, and expiry behavior are all covered, leaving nothing an agent needs to invoke and interpret the call.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the three parameters are already documented, but the description adds cross-parameter meaning the schema cannot: the 403 case means the token belongs to another user and you must pass the userId that signed in, and a 404 on leaderboardKey should be resolved via horizon_list_leaderboards. That is genuine added semantic value beyond the schema, though the field-level format details remain the schema's job.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a precise verb+resource: returns the player's rank reward state for the previous scoring period of a board, and enumerates the four states. It explicitly separates itself from horizon_claim_leaderboard_reward (crediting) and horizon_get_leaderboard_top with period previous (standings), so an agent can discriminate without opening other schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives an explicit 'Use when' trigger (a weekly/monthly period ended and the game wants to show 'you placed 3rd, claim 500 coins'), a sequencing rule (call before horizon_claim_leaderboard_reward), and a 'Not for' section naming the two alternatives with the conditions that select them.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools